73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/rubocop/cop/cop.rb', line 73
def add_offense(node_or_range, location: :expression, message: nil, severity: nil, &block)
@v0_argument = node_or_range
range = find_location(node_or_range, location)
range = range_for_original(range)
if block.nil? && !self.class.support_autocorrect?
super(range, message: message, severity: severity)
else
super(range, message: message, severity: severity) do |corrector|
emulate_v0_callsequence(corrector, &block)
end
end
end
|