Class: Namarara::EvalError
- Inherits:
-
Object
- Object
- Namarara::EvalError
- Defined in:
- lib/namarara/eval_error.rb
Direct Known Subclasses
Namarara::Errors::InvalidGrammar, Namarara::Errors::VarNotDefined
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#var ⇒ Object
Returns the value of attribute var.
Instance Method Summary collapse
-
#initialize(hash) ⇒ EvalError
constructor
A new instance of EvalError.
Constructor Details
#initialize(hash) ⇒ EvalError
Returns a new instance of EvalError.
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
#message ⇒ Object
Returns the value of attribute message.
6 7 8 |
# File 'lib/namarara/eval_error.rb', line 6 def @message end |
#var ⇒ Object
Returns the value of attribute var.
5 6 7 |
# File 'lib/namarara/eval_error.rb', line 5 def var @var end |