Class: Retab::WorkflowGraphVersion
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowGraphVersion
- Defined in:
- lib/retab/workflows/workflow_graph_version.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, workflow_id: :workflow_id, blocks: :blocks, edges: :edges, block_version_ids: :block_version_ids, edge_version_ids: :edge_version_ids, created_at: :created_at }.freeze
Instance Attribute Summary collapse
-
#block_version_ids ⇒ Object
Returns the value of attribute block_version_ids.
-
#blocks ⇒ Object
Returns the value of attribute blocks.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#edge_version_ids ⇒ Object
Returns the value of attribute edge_version_ids.
-
#edges ⇒ Object
Returns the value of attribute edges.
-
#id ⇒ Object
Returns the value of attribute id.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowGraphVersion
constructor
A new instance of WorkflowGraphVersion.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowGraphVersion
Returns a new instance of WorkflowGraphVersion.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 28 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @workflow_id = hash[:workflow_id] @blocks = (hash[:blocks] || []).map { |item| item ? Retab::WorkflowConfigBlock.new(item) : nil } @edges = (hash[:edges] || []).map { |item| item ? Retab::WorkflowConfigEdge.new(item) : nil } @block_version_ids = (hash[:block_version_ids] || []) @edge_version_ids = (hash[:edge_version_ids] || []) @created_at = hash[:created_at] end |
Instance Attribute Details
#block_version_ids ⇒ Object
Returns the value of attribute block_version_ids.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def block_version_ids @block_version_ids end |
#blocks ⇒ Object
Returns the value of attribute blocks.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def blocks @blocks end |
#created_at ⇒ Object
Returns the value of attribute created_at.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def created_at @created_at end |
#edge_version_ids ⇒ Object
Returns the value of attribute edge_version_ids.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def edge_version_ids @edge_version_ids end |
#edges ⇒ Object
Returns the value of attribute edges.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def edges @edges end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def id @id end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
18 19 20 |
# File 'lib/retab/workflows/workflow_graph_version.rb', line 18 def workflow_id @workflow_id end |