Class: Generators::TDriverGenerator
- Defined in:
- lib/tdriver-devtools/behaviour/old/xml/lib/tdriver_generator.rb
Constant Summary collapse
- TYPE =
{ :file => 1, :class => 2, :module => 3 }
- VISIBILITY =
{ :public => 1, :private => 2, :protected => 3 }
- PROCESS_METHODS =
{ :method_list => :process_method, :aliases => :process_alias, :constants => :process_constant, :requires => :process_require, :includes => :process_include, :attributes => :process_attribute }
Class Method Summary collapse
Instance Method Summary collapse
-
#generate(files) ⇒ Object
Rdoc passes in TopLevel objects from the code_objects.rb tree (all files).
-
#initialize(options) ⇒ TDriverGenerator
constructor
:not-new:.
Constructor Details
#initialize(options) ⇒ TDriverGenerator
:not-new:
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/tdriver-devtools/behaviour/old/xml/lib/tdriver_generator.rb', line 59 def initialize( ) #:not-new: @options = @current_behaviour = nil @behaviours = {} # set up a hash to keep track of all the classes/modules we have processed @already_processed = {} @module_template = template( "templates/behaviour.module" ) @method_template = template( "templates/behaviour.method" ) @xml_behaviour_template = template( "templates/behaviour.xml" ) @xml_method_template = template( "templates/behaviour.xml.method" ) @xml_argument_template = template( "templates/behaviour.xml.argument" ) @xml_argument_type_template = template( "templates/behaviour.xml.argument_type" ) @xml_exception_template = template( "templates/behaviour.xml.exception" ) @xml_howto_template = template( "templates/behaviour.xml.howto" ) @xml_howto_line_template = template( "templates/behaviour.xml.howto.line" ) # set up a hash to keep track of all of the objects to be output @output = { :files => [], :classes => [], :modules => [], :attributes => [], :methods => [], :aliases => [], :constants => [], :requires => [], :includes => [] } end |
Class Method Details
.for(options) ⇒ Object
53 54 55 56 57 |
# File 'lib/tdriver-devtools/behaviour/old/xml/lib/tdriver_generator.rb', line 53 def TDriverGenerator.for( ) new( ) end |
Instance Method Details
#generate(files) ⇒ Object
Rdoc passes in TopLevel objects from the code_objects.rb tree (all files)
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/tdriver-devtools/behaviour/old/xml/lib/tdriver_generator.rb', line 97 def generate( files ) # Each object passed in is a file, process it files.each { | file | process_file( file ) } end |