Class: Gloo::Expr::LBoolean
- Inherits:
-
Core::Literal
- Object
- Core::Literal
- Gloo::Expr::LBoolean
- Defined in:
- lib/gloo/expr/l_boolean.rb
Instance Attribute Summary
Attributes inherited from Core::Literal
Class Method Summary collapse
-
.boolean?(token) ⇒ Boolean
Is the given token a boolean?.
Instance Method Summary collapse
-
#set_value(value) ⇒ Object
Set the value, converting to an boolean.
-
#to_s ⇒ Object
Get string representation.
Methods inherited from Core::Literal
Constructor Details
This class inherits a constructor from Gloo::Core::Literal
Class Method Details
Instance Method Details
#set_value(value) ⇒ Object
Set the value, converting to an boolean.
21 22 23 |
# File 'lib/gloo/expr/l_boolean.rb', line 21 def set_value( value ) @value = Gloo::Objs::Boolean.coerse_to_bool value end |
#to_s ⇒ Object
Get string representation
28 29 30 31 32 |
# File 'lib/gloo/expr/l_boolean.rb', line 28 def to_s return 'false' unless @value return @value.to_s end |