Class: RDoc::Generator::Horo

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/generator/horo.rb

Defined Under Namespace

Modules: ClassesHelper, FileHelper, FileIndexHelper Classes: TemplateContext

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Horo

Returns a new instance of Horo.



15
16
17
18
19
20
21
22
23
24
# File 'lib/rdoc/generator/horo.rb', line 15

def initialize options
  @options   = options
  @files     = nil
  @classes   = nil
  @methods   = nil
  @file_dir  = 'files'
  @class_dir = 'classes'
  @app_root  = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
  @op_dir    = File.expand_path options.op_dir
end

Instance Attribute Details

#class_dirObject

Returns the value of attribute class_dir.



13
14
15
# File 'lib/rdoc/generator/horo.rb', line 13

def class_dir
  @class_dir
end

#file_dirObject

Returns the value of attribute file_dir.



13
14
15
# File 'lib/rdoc/generator/horo.rb', line 13

def file_dir
  @file_dir
end

Instance Method Details

#generate(top_levels) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/rdoc/generator/horo.rb', line 26

def generate top_levels
  @files = top_levels
  @classes = RDoc::TopLevel.all_classes_and_modules
  @methods = @classes.map { |x| x.method_list }.flatten

  write_static_files
  write_index
  write_file_index
  write_class_index
  write_method_index
  write_classes
  write_files
end