Class: YARP::ParseError
- Inherits:
-
Object
- Object
- YARP::ParseError
- Defined in:
- lib/yarp.rb,
ext/yarp/extension.c
Overview
This represents an error that was encountered during parsing.
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(message, location) ⇒ ParseError
constructor
A new instance of ParseError.
- #inspect ⇒ Object
Constructor Details
#initialize(message, location) ⇒ ParseError
Returns a new instance of ParseError.
173 174 175 176 |
# File 'lib/yarp.rb', line 173 def initialize(, location) @message = @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
171 172 173 |
# File 'lib/yarp.rb', line 171 def location @location end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
171 172 173 |
# File 'lib/yarp.rb', line 171 def @message end |
Instance Method Details
#deconstruct_keys(keys) ⇒ Object
178 179 180 |
# File 'lib/yarp.rb', line 178 def deconstruct_keys(keys) { message: , location: location } end |
#inspect ⇒ Object
182 183 184 |
# File 'lib/yarp.rb', line 182 def inspect "#<YARP::ParseError @message=#{@message.inspect} @location=#{@location.inspect}>" end |