Class: MixinComment::Parser
- Inherits:
-
Object
- Object
- MixinComment::Parser
- Defined in:
- lib/mixin_comment/parser.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(dirs) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(dirs) ⇒ Parser
Returns a new instance of Parser.
5 6 7 8 |
# File 'lib/mixin_comment/parser.rb', line 5 def initialize(dirs) @dirs = Array(dirs) @parts = [] end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mixin_comment/parser.rb', line 10 def call rdoc = RDoc::RDoc.new rdoc.document(['--dry-run'] + @dirs) rdoc.generator.classes.each do |mod| next unless mod.module? mod.comment_location.each do |comments| comments.each do |comment| if comment.is_a?(RDoc::Comment) parse_module_comment(mod, comment) end end end end @parts end |