class RuboCop::ErrorWithAnalyzedFileLocation
A wrapper to display errored location of analyzed file.
Attributes
cause[R]
cop[R]
Public Class Methods
new(cause:, node:, cop:)
click to toggle source
Calls superclass method
# File lib/rubocop/error.rb, line 14 def initialize(cause:, node:, cop:) super() @cause = cause @cop = cop @location = node.is_a?(RuboCop::AST::Node) ? node.loc : node end
Public Instance Methods
column()
click to toggle source
# File lib/rubocop/error.rb, line 27 def column @location&.column end
line()
click to toggle source
# File lib/rubocop/error.rb, line 23 def line @location&.line end
message()
click to toggle source
# File lib/rubocop/error.rb, line 31 def message "cause: #{cause.inspect}" end