Class: Retab::ConditionalEvaluation
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ConditionalEvaluation
- Defined in:
- lib/retab/workflow_artifacts/conditional_evaluation.rb
Constant Summary collapse
- HASH_ATTRS =
{ operation: :operation, id: :id, workflow_run_id: :workflow_run_id, step_id: :step_id, evaluations: :evaluations, selected_handles: :selected_handles, matched_branch_id: :matched_branch_id, matched_condition_ids: :matched_condition_ids, created_at: :created_at }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#evaluations ⇒ Object
Returns the value of attribute evaluations.
-
#id ⇒ Object
Returns the value of attribute id.
-
#matched_branch_id ⇒ Object
Returns the value of attribute matched_branch_id.
-
#matched_condition_ids ⇒ Object
Returns the value of attribute matched_condition_ids.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#selected_handles ⇒ Object
Returns the value of attribute selected_handles.
-
#step_id ⇒ Object
Returns the value of attribute step_id.
-
#workflow_run_id ⇒ Object
Returns the value of attribute workflow_run_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ConditionalEvaluation
constructor
A new instance of ConditionalEvaluation.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ConditionalEvaluation
Returns a new instance of ConditionalEvaluation.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 31 def initialize(json) hash = self.class.normalize(json) @operation = hash[:operation] @id = hash[:id] @workflow_run_id = hash[:workflow_run_id] @step_id = hash[:step_id] @evaluations = (hash[:evaluations] || []).map { |item| item ? Retab::ConditionEvaluationResult.new(item) : nil } @selected_handles = (hash[:selected_handles] || []) @matched_branch_id = hash[:matched_branch_id] @matched_condition_ids = (hash[:matched_condition_ids] || []) @created_at = hash[:created_at] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def created_at @created_at end |
#evaluations ⇒ Object
Returns the value of attribute evaluations.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def evaluations @evaluations end |
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def id @id end |
#matched_branch_id ⇒ Object
Returns the value of attribute matched_branch_id.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def matched_branch_id @matched_branch_id end |
#matched_condition_ids ⇒ Object
Returns the value of attribute matched_condition_ids.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def matched_condition_ids @matched_condition_ids end |
#operation ⇒ Object
Returns the value of attribute operation.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def operation @operation end |
#selected_handles ⇒ Object
Returns the value of attribute selected_handles.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def selected_handles @selected_handles end |
#step_id ⇒ Object
Returns the value of attribute step_id.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def step_id @step_id end |
#workflow_run_id ⇒ Object
Returns the value of attribute workflow_run_id.
20 21 22 |
# File 'lib/retab/workflow_artifacts/conditional_evaluation.rb', line 20 def workflow_run_id @workflow_run_id end |