123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::CommentConfig::DirectiveRange Private

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Range
Instance Chain:
self, Range
Inherits: Range
  • Object
Defined in: lib/rubocop/comment_config/directive_range.rb

Overview

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.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(first_line, last_line, directive) ⇒ DirectiveRange

[ GitHub ]

  
# 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 (readonly)

[ GitHub ]

  
# File 'lib/rubocop/comment_config/directive_range.rb', line 10

attr_reader :directive