Class: Groonga::Command::Parser::Error
- Inherits:
-
Command::Error
- Object
- Command::Error
- Groonga::Command::Parser::Error
- Defined in:
- lib/groonga/command/parser/error.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(reason, before, after) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(reason, before, after) ⇒ Error
Returns a new instance of Error.
26 27 28 29 30 |
# File 'lib/groonga/command/parser/error.rb', line 26 def initialize(reason, before, after) @reason = reason @location = compute_location(before, after) super("#{@reason}:\n#{@location}") end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
25 26 27 |
# File 'lib/groonga/command/parser/error.rb', line 25 def location @location end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
25 26 27 |
# File 'lib/groonga/command/parser/error.rb', line 25 def reason @reason end |