Class: Retab::WorkflowBlockVersion
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowBlockVersion
- Defined in:
- lib/retab/workflow_blocks/workflow_block_version.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, block_id: :block_id, workflow_id: :workflow_id, workflow_version_id: :workflow_version_id, type: :type, label: :label, position_x: :position_x, position_y: :position_y, width: :width, height: :height, parent_id: :parent_id, config: :config, resolved_schemas: :resolved_schemas, config_hash: :config_hash, created_at: :created_at }.freeze
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#config ⇒ Object
Returns the value of attribute config.
-
#config_hash ⇒ Object
Returns the value of attribute config_hash.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#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.
-
#width ⇒ Object
Returns the value of attribute width.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
-
#workflow_version_id ⇒ Object
Returns the value of attribute workflow_version_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowBlockVersion
constructor
A new instance of WorkflowBlockVersion.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowBlockVersion
Returns a new instance of WorkflowBlockVersion.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 44 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @block_id = hash[:block_id] @workflow_id = hash[:workflow_id] @workflow_version_id = hash[:workflow_version_id] @type = hash[:type] @label = hash[:label].nil? ? "" : hash[:label] @position_x = hash[:position_x] @position_y = hash[:position_y] @width = hash[:width] @height = hash[:height] @parent_id = hash[:parent_id] @config = hash[:config] || {} @resolved_schemas = hash[:resolved_schemas] || {} @config_hash = hash[:config_hash].nil? ? "" : hash[:config_hash] @created_at = hash[:created_at] end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def block_id @block_id end |
#config ⇒ Object
Returns the value of attribute config.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def config @config end |
#config_hash ⇒ Object
Returns the value of attribute config_hash.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def config_hash @config_hash end |
#created_at ⇒ Object
Returns the value of attribute created_at.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def created_at @created_at end |
#height ⇒ Object
Returns the value of attribute height.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def label @label end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def parent_id @parent_id end |
#position_x ⇒ Object
Returns the value of attribute position_x.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def position_x @position_x end |
#position_y ⇒ Object
Returns the value of attribute position_y.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def position_y @position_y end |
#resolved_schemas ⇒ Object
Returns the value of attribute resolved_schemas.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def resolved_schemas @resolved_schemas end |
#type ⇒ Object
Returns the value of attribute type.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def width @width end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def workflow_id @workflow_id end |
#workflow_version_id ⇒ Object
Returns the value of attribute workflow_version_id.
26 27 28 |
# File 'lib/retab/workflow_blocks/workflow_block_version.rb', line 26 def workflow_version_id @workflow_version_id end |