Class: Retab::WhileLoopTermination

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_artifacts/while_loop_termination.rb

Constant Summary collapse

HASH_ATTRS =
{
  operation: :operation,
  id: :id,
  workflow_run_id: :workflow_run_id,
  step_id: :step_id,
  termination_reason: :termination_reason,
  evaluations: :evaluations,
  created_at: :created_at
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ WhileLoopTermination

Returns a new instance of WhileLoopTermination.



27
28
29
30
31
32
33
34
35
36
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 27

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]
  @termination_reason = hash[:termination_reason]
  @evaluations = (hash[:evaluations] || []).map { |item| item ? Retab::ConditionEvaluationResult.new(item) : nil }
  @created_at = hash[:created_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def created_at
  @created_at
end

#evaluationsObject

Returns the value of attribute evaluations.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def evaluations
  @evaluations
end

#idObject

Returns the value of attribute id.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def id
  @id
end

#operationObject

Returns the value of attribute operation.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def operation
  @operation
end

#step_idObject

Returns the value of attribute step_id.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def step_id
  @step_id
end

#termination_reasonObject

Returns the value of attribute termination_reason.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def termination_reason
  @termination_reason
end

#workflow_run_idObject

Returns the value of attribute workflow_run_id.



18
19
20
# File 'lib/retab/workflow_artifacts/while_loop_termination.rb', line 18

def workflow_run_id
  @workflow_run_id
end