Class: Retab::WorkflowBlock
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowBlock
- Defined in:
- lib/retab/workflow_blocks/workflow_block.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, workflow_id: :workflow_id, type: :type, label: :label, position_x: :position_x, position_y: :position_y, width: :width, height: :height, config: :config, parent_id: :parent_id, updated_at: :updated_at, resolved_schemas: :resolved_schemas }.freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#height ⇒ Object
Returns the value of attribute height.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#position_x ⇒ Object
Returns the value of attribute position_x.
-
#position_y ⇒ Object
Returns the value of attribute position_y.
-
#resolved_schemas ⇒ Object
Returns the value of attribute resolved_schemas.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#width ⇒ Object
Returns the value of attribute width.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowBlock
constructor
A new instance of WorkflowBlock.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowBlock
Returns a new instance of WorkflowBlock.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 37 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @workflow_id = hash[:workflow_id] @type = hash[:type] @label = hash[:label] @position_x = hash[:position_x] @position_y = hash[:position_y] @width = hash[:width] @height = hash[:height] @config = hash[:config] || {} @parent_id = hash[:parent_id] @updated_at = hash[:updated_at] @resolved_schemas = hash[:resolved_schemas] || {} end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def config @config end |
#height ⇒ Object
Returns the value of attribute height.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def label @label end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def parent_id @parent_id end |
#position_x ⇒ Object
Returns the value of attribute position_x.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def position_x @position_x end |
#position_y ⇒ Object
Returns the value of attribute position_y.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def position_y @position_y end |
#resolved_schemas ⇒ Object
Returns the value of attribute resolved_schemas.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def resolved_schemas @resolved_schemas end |
#type ⇒ Object
Returns the value of attribute type.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def updated_at @updated_at end |
#width ⇒ Object
Returns the value of attribute width.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def width @width end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
23 24 25 |
# File 'lib/retab/workflow_blocks/workflow_block.rb', line 23 def workflow_id @workflow_id end |