Class: Retab::ReviewEvaluation
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ReviewEvaluation
- Defined in:
- lib/retab/workflow_artifacts/review_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, requires_human_review: :requires_human_review, reviewer_id: :reviewer_id, review_decision: :review_decision, review_notes: :review_notes, requested_revision: :requested_revision, reviewed_at: :reviewed_at, 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.
-
#requested_revision ⇒ Object
Returns the value of attribute requested_revision.
-
#requires_human_review ⇒ Object
Returns the value of attribute requires_human_review.
-
#review_decision ⇒ Object
Returns the value of attribute review_decision.
-
#review_notes ⇒ Object
Returns the value of attribute review_notes.
-
#reviewed_at ⇒ Object
Returns the value of attribute reviewed_at.
-
#reviewer_id ⇒ Object
Returns the value of attribute reviewer_id.
-
#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) ⇒ ReviewEvaluation
constructor
A new instance of ReviewEvaluation.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ReviewEvaluation
Returns a new instance of ReviewEvaluation.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 43 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] || []) @requires_human_review = hash[:requires_human_review] @reviewer_id = hash[:reviewer_id] @review_decision = hash[:review_decision] @review_notes = hash[:review_notes] @requested_revision = hash[:requested_revision] @reviewed_at = hash[:reviewed_at] @created_at = hash[:created_at] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def created_at @created_at end |
#evaluations ⇒ Object
Returns the value of attribute evaluations.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def evaluations @evaluations end |
#id ⇒ Object
Returns the value of attribute id.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def id @id end |
#matched_branch_id ⇒ Object
Returns the value of attribute matched_branch_id.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def matched_branch_id @matched_branch_id end |
#matched_condition_ids ⇒ Object
Returns the value of attribute matched_condition_ids.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def matched_condition_ids @matched_condition_ids end |
#operation ⇒ Object
Returns the value of attribute operation.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def operation @operation end |
#requested_revision ⇒ Object
Returns the value of attribute requested_revision.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def requested_revision @requested_revision end |
#requires_human_review ⇒ Object
Returns the value of attribute requires_human_review.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def requires_human_review @requires_human_review end |
#review_decision ⇒ Object
Returns the value of attribute review_decision.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def review_decision @review_decision end |
#review_notes ⇒ Object
Returns the value of attribute review_notes.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def review_notes @review_notes end |
#reviewed_at ⇒ Object
Returns the value of attribute reviewed_at.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def reviewed_at @reviewed_at end |
#reviewer_id ⇒ Object
Returns the value of attribute reviewer_id.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def reviewer_id @reviewer_id end |
#selected_handles ⇒ Object
Returns the value of attribute selected_handles.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def selected_handles @selected_handles end |
#step_id ⇒ Object
Returns the value of attribute step_id.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def step_id @step_id end |
#workflow_run_id ⇒ Object
Returns the value of attribute workflow_run_id.
26 27 28 |
# File 'lib/retab/workflow_artifacts/review_evaluation.rb', line 26 def workflow_run_id @workflow_run_id end |