Method: RDoc::TopLevel.parse
- Defined in:
- lib/erbook/rdoc.rb
.parse(code_string, file_name = __FILE__) ⇒ Object
Returns a RDoc::TopLevel object containing information parsed from the given code string. This information is also added to the global TopLevel class state, so you can access it via the class methods of the TopLevel class.
If the file name (which signifies the origin of the given code) is given, it MUST have a “.c” or “.rb” file extension. Otherwise, RDoc will ignore the given code string! :-(
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/erbook/rdoc.rb', line 65 def self.parse code_string, file_name = __FILE__ tl = TopLevel.new(file_name) op = DummyOptions.new st = Stats.new(0) result = Parser.for(tl, file_name, code_string, op, st).scan refresh_all_classes_and_modules result end |