Class: Retab::ConditionEvaluationSubCondition
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ConditionEvaluationSubCondition
- Defined in:
- lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb
Constant Summary collapse
- HASH_ATTRS =
{ sub_condition_id: :sub_condition_id, path: :path, operator: :operator, expected: :expected, actual: :actual, matched: :matched, per_item: :per_item }.freeze
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
-
#expected ⇒ Object
Returns the value of attribute expected.
-
#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_condition_id ⇒ Object
Returns the value of attribute sub_condition_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ConditionEvaluationSubCondition
constructor
A new instance of ConditionEvaluationSubCondition.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ConditionEvaluationSubCondition
Returns a new instance of ConditionEvaluationSubCondition.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 27 def initialize(json) hash = self.class.normalize(json) @sub_condition_id = hash[:sub_condition_id] @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 } end |
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def actual @actual end |
#expected ⇒ Object
Returns the value of attribute expected.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def expected @expected end |
#matched ⇒ Object
Returns the value of attribute matched.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def matched @matched end |
#operator ⇒ Object
Returns the value of attribute operator.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def operator @operator end |
#path ⇒ Object
Returns the value of attribute path.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def path @path end |
#per_item ⇒ Object
Returns the value of attribute per_item.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def per_item @per_item end |
#sub_condition_id ⇒ Object
Returns the value of attribute sub_condition_id.
18 19 20 |
# File 'lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb', line 18 def sub_condition_id @sub_condition_id end |