Class: Retab::WorkflowGraphDiagnosisRequest

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflows/workflow_graph_diagnosis_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  blocks: :blocks,
  edges: :edges,
  re_propagate: :re_propagate
}.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) ⇒ WorkflowGraphDiagnosisRequest

Returns a new instance of WorkflowGraphDiagnosisRequest.



19
20
21
22
23
24
# File 'lib/retab/workflows/workflow_graph_diagnosis_request.rb', line 19

def initialize(json)
  hash = self.class.normalize(json)
  @blocks = (hash[:blocks] || []).map { |item| item ? Retab::WorkflowConfigBlock.new(item) : nil }
  @edges = (hash[:edges] || []).map { |item| item ? Retab::WorkflowConfigEdge.new(item) : nil }
  @re_propagate = hash[:re_propagate]
end

Instance Attribute Details

#blocksObject

Returns the value of attribute blocks.



14
15
16
# File 'lib/retab/workflows/workflow_graph_diagnosis_request.rb', line 14

def blocks
  @blocks
end

#edgesObject

Returns the value of attribute edges.



14
15
16
# File 'lib/retab/workflows/workflow_graph_diagnosis_request.rb', line 14

def edges
  @edges
end

#re_propagateObject

Returns the value of attribute re_propagate.



14
15
16
# File 'lib/retab/workflows/workflow_graph_diagnosis_request.rb', line 14

def re_propagate
  @re_propagate
end