Class: RDocRuboCop::Lang::C::Comment::Normal
- Inherits:
-
RDocRuboCop::Lang::C::Comment
- Object
- Base::Comment
- RDocRuboCop::Lang::C::Comment
- RDocRuboCop::Lang::C::Comment::Normal
- Defined in:
- lib/rdoc_rubocop/lang/c/comment/normal.rb
Overview
This class manages comments of the following form:
/*
* Document-class: Foo
*
* code1
* code2
*/
Instance Attribute Summary
Attributes inherited from RDocRuboCop::Lang::C::Comment
#comment_text, #offset_begin, #offset_end, #source_file
Instance Method Summary collapse
Methods inherited from RDocRuboCop::Lang::C::Comment
Methods inherited from Base::Comment
Constructor Details
This class inherits a constructor from RDocRuboCop::Lang::C::Comment
Instance Method Details
#corrected_text ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/rdoc_rubocop/lang/c/comment/normal.rb', line 20 def corrected_text body = rdoc.apply first_line = body.slice!(/\A.*\R/) body.gsub!(/^/, indent) text = "/*#{@indent_after_asterisk}#{first_line}#{body}".gsub(/ *$/, "") "#{text}#{@end_str}" end |