Class: Retab::ConditionEvaluationDetails
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ConditionEvaluationDetails
- Defined in:
- lib/retab/workflow_artifacts/condition_evaluation_details.rb
Constant Summary collapse
- HASH_ATTRS =
{ path: :path, operator: :operator, expected: :expected, actual: :actual, matched: :matched, per_item: :per_item, sub_conditions: :sub_conditions, logical_operator: :logical_operator }.freeze
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
-
#expected ⇒ Object
Returns the value of attribute expected.
-
#logical_operator ⇒ Object
Returns the value of attribute logical_operator.
-
#matched ⇒ Object
Returns the value of attribute matched.
-
#operator ⇒ Object
Returns the value of attribute operator.
-
#path ⇒ Object
Returns the value of attribute path.
-
#per_item ⇒ Object
Returns the value of attribute per_item.
-
#sub_conditions ⇒ Object
Returns the value of attribute sub_conditions.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ConditionEvaluationDetails
constructor
A new instance of ConditionEvaluationDetails.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ConditionEvaluationDetails
Returns a new instance of ConditionEvaluationDetails.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 29 def initialize(json) hash = self.class.normalize(json) @path = hash[:path] @operator = hash[:operator] @expected = hash[:expected] @actual = hash[:actual] @matched = hash[:matched] @per_item = (hash[:per_item] || []).map { |item| item ? Retab::ConditionEvaluationPerItem.new(item) : nil } @sub_conditions = (hash[:sub_conditions] || []).map { |item| item ? Retab::ConditionEvaluationSubCondition.new(item) : nil } @logical_operator = hash[:logical_operator] end |
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def actual @actual end |
#expected ⇒ Object
Returns the value of attribute expected.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def expected @expected end |
#logical_operator ⇒ Object
Returns the value of attribute logical_operator.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def logical_operator @logical_operator end |
#matched ⇒ Object
Returns the value of attribute matched.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def matched @matched end |
#operator ⇒ Object
Returns the value of attribute operator.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def operator @operator end |
#path ⇒ Object
Returns the value of attribute path.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def path @path end |
#per_item ⇒ Object
Returns the value of attribute per_item.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def per_item @per_item end |
#sub_conditions ⇒ Object
Returns the value of attribute sub_conditions.
19 20 21 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_details.rb', line 19 def sub_conditions @sub_conditions end |