Module: RuboCop::Cop::CommentsHelp
- Includes:
- VisibilityHelp
- Included in:
- Style::ClassMethodsDefinitions
- Defined in:
- lib/rubocop/cop/mixin/comments_help.rb
Overview
Help methods for working with nodes containing comments.
Constant Summary
Constants included from VisibilityHelp
VisibilityHelp::VISIBILITY_SCOPES
Instance Method Summary collapse
Instance Method Details
#source_range_with_comment(node) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rubocop/cop/mixin/comments_help.rb', line 9 def source_range_with_comment(node) begin_pos = begin_pos_with_comment(node) end_pos = end_position_for(node) end_pos += 1 if node.def_type? Parser::Source::Range.new(buffer, begin_pos, end_pos) end |