Class: Rox::Core::EvaluationResult
- Inherits:
-
Object
- Object
- Rox::Core::EvaluationResult
- Defined in:
- lib/rox/core/roxx/evaluation_result.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #bool_value ⇒ Object
-
#initialize(value) ⇒ EvaluationResult
constructor
A new instance of EvaluationResult.
- #string_value ⇒ Object
Constructor Details
#initialize(value) ⇒ EvaluationResult
Returns a new instance of EvaluationResult.
9 10 11 |
# File 'lib/rox/core/roxx/evaluation_result.rb', line 9 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/rox/core/roxx/evaluation_result.rb', line 7 def value @value end |
Instance Method Details
#bool_value ⇒ Object
13 14 15 16 17 18 |
# File 'lib/rox/core/roxx/evaluation_result.rb', line 13 def bool_value return false if value.nil? return value if Utils.boolean?(value) nil end |
#string_value ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/rox/core/roxx/evaluation_result.rb', line 20 def string_value return value if value.is_a? String return nil if value.nil? return Flag::FLAG_TRUE_VALUE if value return Flag::FLAG_FALSE_VALUE unless value nil end |