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.
229 230 231 |
# File 'lib/kalc/ast.rb', line 229 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
227 228 229 |
# File 'lib/kalc/ast.rb', line 227 def value @value end |
Instance Method Details
#eval(context) ⇒ Object
233 234 235 |
# File 'lib/kalc/ast.rb', line 233 def eval(context) value.to_s end |