--- !ruby/object:RDoc::RI::ClassDescription 
attributes: 
- !ruby/object:RDoc::RI::Attribute 
  comment: 
  name: parsers
  rw: R
class_methods: 
- !ruby/object:RDoc::RI::MethodSummary 
  name: alias_extension
- !ruby/object:RDoc::RI::MethodSummary 
  name: binary?
- !ruby/object:RDoc::RI::MethodSummary 
  name: can_parse
- !ruby/object:RDoc::RI::MethodSummary 
  name: for
- !ruby/object:RDoc::RI::MethodSummary 
  name: new
- !ruby/object:RDoc::RI::MethodSummary 
  name: parse_files_matching
comment: 
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: A parser is simple a class that implements
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  #initialize(file_name, body, options)\n"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: and
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  #scan\n"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: The initialize method takes a file name to be used, the body of the file, and an RDoc::Options object. The scan method is then called to return an appropriately parsed TopLevel code object.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: The ParseFactory is used to redirect to the correct parser given a filename extension. This magic works because individual parsers have to register themselves with us as they are loaded in. The do this using the following incantation
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  require &quot;rdoc/parser&quot;\n\n  class RDoc::Parser::Xyz &lt; RDoc::Parser\n    parse_files_matching /\\.xyz$/ # &lt;&lt;&lt;&lt;\n\n    def initialize(file_name, body, options)\n      ...\n    end\n\n    def scan\n      ...\n    end\n  end\n"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: Just to make life interesting, if we suspect a plain text file, we also look for a shebang line just in case it's a potential shell script
constants: []

full_name: RDoc::Parser
includes: []

instance_methods: []

name: Parser
superclass: Object
