Class: Retab::WorkflowConfigBlock
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowConfigBlock
- Defined in:
- lib/retab/workflows/workflow_config_block.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, type: :type, position: :position, label: :label, config: :config, resolved_schemas: :resolved_schemas, width: :width, height: :height, parent_id: :parent_id }.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 ⇒ Object
Returns the value of attribute position.
-
#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.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowConfigBlock
constructor
A new instance of WorkflowConfigBlock.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowConfigBlock
Returns a new instance of WorkflowConfigBlock.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 31 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @type = hash[:type] @position = hash[:position] ? Retab::WorkflowBlockPosition.new(hash[:position]) : nil @label = hash[:label] @config = hash[:config] || {} @resolved_schemas = hash[:resolved_schemas] || {} @width = hash[:width] @height = hash[:height] @parent_id = hash[:parent_id] end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def config @config end |
#height ⇒ Object
Returns the value of attribute height.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def label @label end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def parent_id @parent_id end |
#position ⇒ Object
Returns the value of attribute position.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def position @position end |
#resolved_schemas ⇒ Object
Returns the value of attribute resolved_schemas.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def resolved_schemas @resolved_schemas end |
#type ⇒ Object
Returns the value of attribute type.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
20 21 22 |
# File 'lib/retab/workflows/workflow_config_block.rb', line 20 def width @width end |