Class: JsonLogic::DataPoint
- Inherits:
-
Object
- Object
- JsonLogic::DataPoint
- Defined in:
- lib/json_logic/rule.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
Returns the value of attribute current.
-
#expected ⇒ Object
Returns the value of attribute expected.
-
#name ⇒ Object
Returns the value of attribute name.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(name, operation, expected, current, result) ⇒ DataPoint
constructor
A new instance of DataPoint.
- #report ⇒ Object
Constructor Details
#initialize(name, operation, expected, current, result) ⇒ DataPoint
Returns a new instance of DataPoint.
7 8 9 10 11 12 13 |
# File 'lib/json_logic/rule.rb', line 7 def initialize(name, operation, expected, current, result) @name = name @operation = operation @expected = expected @current = current @result = result end |
Instance Attribute Details
#current ⇒ Object
Returns the value of attribute current.
5 6 7 |
# File 'lib/json_logic/rule.rb', line 5 def current @current end |
#expected ⇒ Object
Returns the value of attribute expected.
5 6 7 |
# File 'lib/json_logic/rule.rb', line 5 def expected @expected end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/json_logic/rule.rb', line 5 def name @name end |
#operation ⇒ Object
Returns the value of attribute operation.
5 6 7 |
# File 'lib/json_logic/rule.rb', line 5 def operation @operation end |
#result ⇒ Object
Returns the value of attribute result.
5 6 7 |
# File 'lib/json_logic/rule.rb', line 5 def result @result end |
Instance Method Details
#report ⇒ Object
15 16 17 |
# File 'lib/json_logic/rule.rb', line 15 def report "DATA: '#{name}' data:#{current || 'None'} #{operation} expected:#{expected_args}, RESULT = #{result}" end |