Class: Rubocop::Changes::Check

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/changes/check.rb

Instance Method Summary collapse

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

#offensesObject


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

#pathObject


17
18
19
# File 'lib/rubocop/changes/check.rb', line 17

def path
  analysis.path
end