Class: Retab::ContainerContextData

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_steps/container_context_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  container_id: :container_id,
  iteration: :iteration,
  is_parallel: :is_parallel,
  parallel_item_index: :parallel_item_index
}.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) ⇒ ContainerContextData

Returns a new instance of ContainerContextData.



21
22
23
24
25
26
27
# File 'lib/retab/workflow_steps/container_context_data.rb', line 21

def initialize(json)
  hash = self.class.normalize(json)
  @container_id = hash[:container_id]
  @iteration = hash[:iteration]
  @is_parallel = hash[:is_parallel]
  @parallel_item_index = hash[:parallel_item_index]
end

Instance Attribute Details

#container_idObject

Returns the value of attribute container_id.



15
16
17
# File 'lib/retab/workflow_steps/container_context_data.rb', line 15

def container_id
  @container_id
end

#is_parallelObject

Returns the value of attribute is_parallel.



15
16
17
# File 'lib/retab/workflow_steps/container_context_data.rb', line 15

def is_parallel
  @is_parallel
end

#iterationObject

Returns the value of attribute iteration.



15
16
17
# File 'lib/retab/workflow_steps/container_context_data.rb', line 15

def iteration
  @iteration
end

#parallel_item_indexObject

Returns the value of attribute parallel_item_index.



15
16
17
# File 'lib/retab/workflow_steps/container_context_data.rb', line 15

def parallel_item_index
  @parallel_item_index
end