Class: RDocRuboCop::Lang::Ruby::CommentExtractor
- Inherits:
-
Object
- Object
- RDocRuboCop::Lang::Ruby::CommentExtractor
- Defined in:
- lib/rdoc_rubocop/lang/ruby/comment_extractor.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(source_file) ⇒ CommentExtractor
constructor
A new instance of CommentExtractor.
Constructor Details
#initialize(source_file) ⇒ CommentExtractor
Returns a new instance of CommentExtractor.
11 12 13 14 |
# File 'lib/rdoc_rubocop/lang/ruby/comment_extractor.rb', line 11 def initialize(source_file) @source_file = source_file @comments = [] end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
9 10 11 |
# File 'lib/rdoc_rubocop/lang/ruby/comment_extractor.rb', line 9 def comments @comments end |
Instance Method Details
#extract ⇒ Object
16 17 18 |
# File 'lib/rdoc_rubocop/lang/ruby/comment_extractor.rb', line 16 def extract @comments = extract_comments end |