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