Class: Rubocop::Changes::Check
- Inherits:
-
Object
- Object
- Rubocop::Changes::Check
- Defined in:
- lib/rubocop/changes/check.rb
Instance Method Summary collapse
-
#initialize(analysis, patch) ⇒ Check
constructor
A new instance of Check.
- #offenses ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(analysis, patch) ⇒ Check
Returns a new instance of Check.
6 7 8 9 |
# File 'lib/rubocop/changes/check.rb', line 6 def initialize(analysis, patch) @analysis = analysis @patch = patch end |
Instance Method Details
#offenses ⇒ Object
11 12 13 14 15 |
# File 'lib/rubocop/changes/check.rb', line 11 def offenses analysis.offenses.select do |offense| line_numbers.include?(line(offense)) end end |
#path ⇒ Object
17 18 19 |
# File 'lib/rubocop/changes/check.rb', line 17 def path analysis.path end |