Class: Kalc::Ast::StringValue
- Inherits:
-
Object
- Object
- Kalc::Ast::StringValue
- Defined in:
- lib/kalc/ast.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #eval(context) ⇒ Object
-
#initialize(value) ⇒ StringValue
constructor
A new instance of StringValue.
Constructor Details
#initialize(value) ⇒ StringValue
Returns a new instance of StringValue.
227 228 229 |
# File 'lib/kalc/ast.rb', line 227 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
225 226 227 |
# File 'lib/kalc/ast.rb', line 225 def value @value end |
Instance Method Details
#eval(context) ⇒ Object
231 232 233 |
# File 'lib/kalc/ast.rb', line 231 def eval(context) value.to_s end |