Class: FExpr::Evaluator::NumNode
Instance Attribute Summary collapse
-
#val ⇒ Object
readonly
Returns the value of attribute val.
Instance Method Summary collapse
- #eval ⇒ Object
-
#initialize(val) ⇒ NumNode
constructor
A new instance of NumNode.
- #to_string(n) ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(val) ⇒ NumNode
Returns a new instance of NumNode.
77 78 79 |
# File 'lib/fexpr/base.rb', line 77 def initialize(val) @val = val end |
Instance Attribute Details
#val ⇒ Object (readonly)
Returns the value of attribute val.
76 77 78 |
# File 'lib/fexpr/base.rb', line 76 def val @val end |
Instance Method Details
#eval ⇒ Object
80 81 82 |
# File 'lib/fexpr/base.rb', line 80 def eval @val end |
#to_string(n) ⇒ Object
83 84 85 |
# File 'lib/fexpr/base.rb', line 83 def to_string(n) x(n) + @val.to_s end |