class Prism::ParseWarning
This represents a warning that was encountered during parsing.
Attributes
location[R]
A Location
object representing the location of this warning in the source.
message[R]
The message associated with this warning.
Public Class Methods
new(message, location)
click to toggle source
Create a new warning object with the given message and location.
# File prism/parse_result.rb, line 316 def initialize(message, location) @message = message @location = location end
Public Instance Methods
deconstruct_keys(keys)
click to toggle source
Implement the hash pattern matching interface for ParseWarning
.
# File prism/parse_result.rb, line 322 def deconstruct_keys(keys) { message: message, location: location } end
inspect()
click to toggle source
Returns a string representation of this warning.
# File prism/parse_result.rb, line 327 def inspect "#<Prism::ParseWarning @message=#{@message.inspect} @location=#{@location.inspect}>" end