Type:
Class

A parser is simple a class that subclasses RDoc::Parser and implements scan to fill in an RDoc::TopLevel with parsed data.

The initialize method takes an RDoc::TopLevel to fill with parsed content, the name of the file to be parsed, the content of the file, an RDoc::Options object and an RDoc::Stats object to inform the user of parsed items. The scan method is then called to parse the file and must return the RDoc::TopLevel object. By calling super these items will be set for you.

In order to be used by RDoc the parser needs to register the file extensions it can parse. Use ::parse_files_matching to register extensions.

require 'rdoc'

class RDoc::Parser::Xyz < RDoc::Parser
  parse_files_matching /\.xyz$/

  def initialize top_level, file_name, content, options, stats
    super

    # extra initialization if needed
  end

  def scan
    # parse file and fill in @top_level
  end
end
remove_private_comments
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::Ruby

remove_private_comments(comment) Instance Public methods Removes private comments

2025-01-10 15:47:30
parse_call_parameters
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::Ruby

parse_call_parameters(tk) Instance Public methods Extracts call parameters from

2025-01-10 15:47:30
parse_entries
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::ChangeLog

parse_entries() Instance Public methods Parses the entries in the

2025-01-10 15:47:30
do_methods
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::C

do_methods() Instance Public methods Scans content for rb_define_method, rb

2025-01-10 15:47:30
do_modules
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::C

do_modules() Instance Public methods Scans content for rb_define_module and

2025-01-10 15:47:30
parse_meta_attr
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::Ruby

parse_meta_attr(context, single, tk, comment) Instance Public methods Parses

2025-01-10 15:47:30
use_markup
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser

use_markup(content) Class Public methods If there is a markup: parser_name

2025-01-10 15:47:30
handle_method
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::C

handle_method(type, var_name, meth_name, function, param_count, source_file = nil) Instance Public methods

2025-01-10 15:47:30
remove_commented_out_lines
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::C

remove_commented_out_lines() Instance Public methods Removes lines that are

2025-01-10 15:47:30
collect_first_comment
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Parser/RDoc::Parser::Ruby

collect_first_comment() Instance Public methods Look for the first comment in

2025-01-10 15:47:30