class Page

Attributes

root_dir[RW]

Public Class Methods

filter_file_path(elements) click to toggle source
# File lib/syskit/scripts/doc.rb, line 51
def self.filter_file_path(elements)
    elements.map { |el| el.gsub(/[^\w]/, "_") }
end
make_file_path(object, root_dir) click to toggle source
# File lib/syskit/scripts/doc.rb, line 55
def self.make_file_path(object, root_dir)
    if object.kind_of?(Class) && (object <= Typelib::Type)
        make_type_file_path(object, root_dir)
    else make_object_file_path(object, root_dir)
    end
end
make_object_file_path(object, root_dir) click to toggle source
# File lib/syskit/scripts/doc.rb, line 68
def self.make_object_file_path(object, root_dir)
    path = filter_file_path(object.name.split("::"))
    File.join(*(root_dir + path)) + ".html"
end
make_type_file_path(type, root_dir) click to toggle source
# File lib/syskit/scripts/doc.rb, line 62
def self.make_type_file_path(type, root_dir)
    name_elements = type.split_typename
    path = filter_file_path(name_elements)
    File.join(*(root_dir + ['types', *path])) + ".html"
end
to_html_page(model, renderer, options = Hash.new) click to toggle source
# File lib/syskit/scripts/doc.rb, line 91
def self.to_html_page(model, renderer, options = Hash.new)
    options, page_options = Kernel.filter_options options, :root_dir => nil
    page = new(MetaRuby::GUI::HTML::HTMLPage.new)
    page.root_dir = options[:root_dir]
    renderer.new(page).render(model, page_options)
    page
end

Public Instance Methods