Class: RuboCop::Cop::Cop::Correction
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Cop::Cop::Correction
- Defined in:
- lib/rubocop/cop/cop.rb
Instance Attribute Summary collapse
-
#cop ⇒ Object
Returns the value of attribute cop.
-
#lambda ⇒ Object
Returns the value of attribute lambda.
-
#node ⇒ Object
Returns the value of attribute node.
Instance Method Summary collapse
Instance Attribute Details
#cop ⇒ Object
Returns the value of attribute cop
34 35 36 |
# File 'lib/rubocop/cop/cop.rb', line 34 def cop @cop end |
#lambda ⇒ Object
Returns the value of attribute lambda
34 35 36 |
# File 'lib/rubocop/cop/cop.rb', line 34 def lambda @lambda end |
#node ⇒ Object
Returns the value of attribute node
34 35 36 |
# File 'lib/rubocop/cop/cop.rb', line 34 def node @node end |
Instance Method Details
#call(corrector) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/rubocop/cop/cop.rb', line 35 def call(corrector) lambda.call(corrector) rescue StandardError => e raise ErrorWithAnalyzedFileLocation.new( cause: e, node: node, cop: cop ) end |