Class: Namarara::EvalError

Inherits:
Object
  • Object
show all
Defined in:
lib/namarara/eval_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ EvalError

Returns a new instance of EvalError.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
15
# File 'lib/namarara/eval_error.rb', line 8

def initialize(hash)
  # validate input
  raise ArgumentError unless hash[:message]

  # load input
  @message = hash[:message]
  @var = hash[:var]
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



6
7
8
# File 'lib/namarara/eval_error.rb', line 6

def message
  @message
end

#varObject

Returns the value of attribute var.



5
6
7
# File 'lib/namarara/eval_error.rb', line 5

def var
  @var
end