Class: Groonga::Command::Parser::Error

Inherits:
Command::Error
  • Object
show all
Defined in:
lib/groonga/command/parser/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#locationObject (readonly)

Returns the value of attribute location.



25
26
27
# File 'lib/groonga/command/parser/error.rb', line 25

def location
  @location
end

#reasonObject (readonly)

Returns the value of attribute reason.



25
26
27
# File 'lib/groonga/command/parser/error.rb', line 25

def reason
  @reason
end