Class: RDocRuboCop::Lang::C::CommentExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc_rubocop/lang/c/comment_extractor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_file) ⇒ CommentExtractor

Returns a new instance of CommentExtractor.



9
10
11
12
# File 'lib/rdoc_rubocop/lang/c/comment_extractor.rb', line 9

def initialize(source_file)
  @source_file = source_file
  @comments = []
end

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.



7
8
9
# File 'lib/rdoc_rubocop/lang/c/comment_extractor.rb', line 7

def comments
  @comments
end

Instance Method Details

#extractObject



14
15
16
# File 'lib/rdoc_rubocop/lang/c/comment_extractor.rb', line 14

def extract
  @comments = extract_comments
end