Class: RuboCop::Cop::Cop::Correction Deprecated

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubocop/cop/cop.rb

Overview

Deprecated.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#copObject

Returns the value of attribute cop

Returns:

  • (Object)

    the current value of cop



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

def cop
  @cop
end

#lambdaObject

Returns the value of attribute lambda

Returns:

  • (Object)

    the current value of lambda



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

def lambda
  @lambda
end

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



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

def node
  @node
end

Instance Method Details

#call(corrector) ⇒ Object



18
19
20
21
22
# File 'lib/rubocop/cop/cop.rb', line 18

def call(corrector)
  lambda.call(corrector)
rescue StandardError => e
  raise ErrorWithAnalyzedFileLocation.new(cause: e, node: node, cop: cop)
end