Class: Plasma::Interpreter::NumNode

Inherits:
PlasmaNode show all
Defined in:
lib/plasma/interpreter/plasma_grammarnode.rb

Instance Method Summary collapse

Methods inherited from PlasmaNode

#empty?

Instance Method Details

#evaluate(env) ⇒ Object



370
371
372
373
374
375
376
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 370

def evaluate(env)
  if self.decimal.empty?
    text_value.to_i
  else
    text_value.to_f
  end
end