Class: RuboCop::CommentConfig::DirectiveRange Private
- Inherits:
-
Range
- Object
- Range
- RuboCop::CommentConfig::DirectiveRange
- Defined in:
- lib/rubocop/comment_config/directive_range.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A disabled line range that remembers the directive comment that opened
it. Value-equal to a plain Range, so consumers comparing or hashing
ranges are unaffected.
Instance Attribute Summary collapse
- #directive ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(first_line, last_line, directive) ⇒ DirectiveRange
constructor
private
A new instance of DirectiveRange.
Constructor Details
#initialize(first_line, last_line, directive) ⇒ DirectiveRange
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DirectiveRange.
12 13 14 15 |
# File 'lib/rubocop/comment_config/directive_range.rb', line 12 def initialize(first_line, last_line, directive) super(first_line, last_line) @directive = directive end |
Instance Attribute Details
#directive ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/rubocop/comment_config/directive_range.rb', line 10 def directive @directive end |