Class: Poetics::Syntax::Number
- Defined in:
- lib/poetics/syntax/literal.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, column, value) ⇒ Number
constructor
A new instance of Number.
- #sexp_name ⇒ Object
Methods inherited from Value
Methods inherited from Node
Constructor Details
#initialize(line, column, value) ⇒ Number
Returns a new instance of Number.
12 13 14 15 |
# File 'lib/poetics/syntax/literal.rb', line 12 def initialize(line, column, value) super @value = value.to_f end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
10 11 12 |
# File 'lib/poetics/syntax/literal.rb', line 10 def value @value end |
Instance Method Details
#sexp_name ⇒ Object
17 18 19 |
# File 'lib/poetics/syntax/literal.rb', line 17 def sexp_name :number end |