Parse a non-source file. We basically take the whole thing as one big comment. If the first character in the file is ’#’, we strip leading pound signs.
Prepare to parse a plain file
# File lib/rdoc/parser/simple.rb, line 15
15: def initialize(top_level, file_name, content, options, stats)
16: super
17:
18: preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include
19:
20: preprocess.handle @content, @top_level
21: end
# File lib/rdoc/parser/simple.rb, line 39
39: def remove_coding_comment text
40: text.sub(/\A# .*coding[=:].*$/, '')
41: end
# File lib/rdoc/parser/simple.rb, line 35
35: def remove_private_comments(comment)
36: comment.gsub(/^--\n.*?^\+\+/, '').sub(/^--\n.*/, '')
37: end
Extract the file contents and attach them to the TopLevel as a comment
# File lib/rdoc/parser/simple.rb, line 26
26: def scan
27: comment = remove_coding_comment @content
28: comment = remove_private_comments comment
29:
30: @top_level.comment = comment
31: @top_level.parser = self.class
32: @top_level
33: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.