Exception: Chutzen::Expression::LookupError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chutzen/expression/lookup_error.rb

Overview

Raised when Chutzen can’t find a value in the job dictionary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, expression: nil, dictionary: nil) ⇒ LookupError

Returns a new instance of LookupError.



9
10
11
12
13
# File 'lib/chutzen/expression/lookup_error.rb', line 9

def initialize(message, expression: nil, dictionary: nil)
  super(message)
  @expression = expression
  @dictionary = dictionary
end

Instance Attribute Details

#dictionaryObject (readonly)

Returns the value of attribute dictionary.



7
8
9
# File 'lib/chutzen/expression/lookup_error.rb', line 7

def dictionary
  @dictionary
end

#expressionObject (readonly)

Returns the value of attribute expression.



7
8
9
# File 'lib/chutzen/expression/lookup_error.rb', line 7

def expression
  @expression
end

Instance Method Details

#as_jsonObject



15
16
17
# File 'lib/chutzen/expression/lookup_error.rb', line 15

def as_json
  { 'error' => details }
end