Method: Variable#__eval__
- Defined in:
- lib/symcalc.rb
#__eval__(var_hash) ⇒ Object
313 314 315 316 317 318 319 320 321 322 |
# File 'lib/symcalc.rb', line 313 def __eval__ var_hash if @fixed_value return @fixed_value elsif var_hash.keys.include?(@name.to_sym) or var_hash.keys.include?(@name.to_s) return (var_hash[@name.to_sym] or var_hash[@name.to_s]) else raise "No value provided for #{@name.to_s} in eval" # return nil end end |