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