Class: Eqn::Number::Float

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/eqn/number.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



24
25
26
27
28
29
30
31
# File 'lib/eqn/number.rb', line 24

def value
  base = elements.shift.value

  # Add any decimal.
  base += elements.shift.value unless elements.empty?

  base
end