Class: Generators::R2DOCGenerator

Inherits:
HTMLGenerator show all
Includes:
ERB::Util, R2Doc::Generator, R2Doc::TemplateUtil
Defined in:
lib/rdoc/generators/r2doc_generator.rb

Overview

R2Doc generator for RDoc v1.0.1

Class Method Summary collapse

Instance Method Summary collapse

Methods included from R2Doc::Generator

#generate

Methods included from R2Doc::TemplateUtil

#content_tag, gen_url, #link_to, #path_to, #render_partial, #stripe_class

Methods inherited from HTMLGenerator

gen_url

Constructor Details

#initialize(*args) ⇒ R2DOCGenerator

Constructor



69
70
71
72
# File 'lib/rdoc/generators/r2doc_generator.rb', line 69

def initialize(*args)
  super
  build_static_file_list
end

Class Method Details

.for(options) ⇒ Object

Factory method



64
65
66
# File 'lib/rdoc/generators/r2doc_generator.rb', line 64

def R2DOCGenerator.for(options)
  R2DOCGenerator.new(options)
end

Instance Method Details

#complete_method_listObject

Return a list of all defined methods



99
100
101
# File 'lib/rdoc/generators/r2doc_generator.rb', line 99

def complete_method_list
  HtmlMethod.all_methods
end

#create_class_context(context, file, options) ⇒ Object

Create a new class object for this RDoc version



94
95
96
# File 'lib/rdoc/generators/r2doc_generator.rb', line 94

def create_class_context(context, file, options)
  HtmlClass.new(context, file, CLASS_DIR, options)
end

#create_file_context(context, options) ⇒ Object

Create a new file object for this RDoc version



89
90
91
# File 'lib/rdoc/generators/r2doc_generator.rb', line 89

def create_file_context(context, options)
  HtmlFile.new(context, options, FILE_DIR)
end

#generate_prepObject

Perform version-specific initialization



75
76
# File 'lib/rdoc/generators/r2doc_generator.rb', line 75

def generate_prep
end

#get_toplevelsObject

Return the list of top level objects for this RDoc version



84
85
86
# File 'lib/rdoc/generators/r2doc_generator.rb', line 84

def get_toplevels
  RDoc::TopLevel
end

#template_nameObject

Return the name of the template



79
80
81
# File 'lib/rdoc/generators/r2doc_generator.rb', line 79

def template_name
  @options.template || 'r2doc'
end