Class: Melbourne::AST::Float
Overview
A float literal as in:
1.2
Instance Attribute Summary collapse
-
#value ⇒ Object
The actual value of the float literal.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, str) ⇒ Float
constructor
A new instance of Float.
Methods inherited from Node
Constructor Details
#initialize(line, str) ⇒ Float
Returns a new instance of Float.
56 57 58 59 |
# File 'lib/melbourne/ast/literals.rb', line 56 def initialize(line, str) @line = line @value = str.to_f end |
Instance Attribute Details
#value ⇒ Object
The actual value of the float literal
54 55 56 |
# File 'lib/melbourne/ast/literals.rb', line 54 def value @value end |