Class: Kalc::Ast::BooleanValue
- Inherits:
-
Object
- Object
- Kalc::Ast::BooleanValue
- 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) ⇒ BooleanValue
constructor
A new instance of BooleanValue.
Constructor Details
#initialize(value) ⇒ BooleanValue
Returns a new instance of BooleanValue.
71 72 73 |
# File 'lib/kalc/ast.rb', line 71 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
69 70 71 |
# File 'lib/kalc/ast.rb', line 69 def value @value end |
Instance Method Details
#eval(context) ⇒ Object
75 76 77 |
# File 'lib/kalc/ast.rb', line 75 def eval(context) @value == 'TRUE' ? true : false end |