Class: Omnium::Parser::AST::Number
- Defined in:
- lib/omnium/parser/ast/number.rb
Overview
An integer node, which would accept an integer/number token.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(token) ⇒ Number
constructor
A new instance of Number.
Constructor Details
#initialize(token) ⇒ Number
Returns a new instance of Number.
10 11 12 13 |
# File 'lib/omnium/parser/ast/number.rb', line 10 def initialize(token) @token = token # for convenience, though no getter for this @value = token.value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/omnium/parser/ast/number.rb', line 8 def value @value end |