Class: Retab::WorkflowTableRow

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/tables/workflow_table_row.rb

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  data: :data,
  position: :position
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

deep_symbolize, #inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ WorkflowTableRow

Returns a new instance of WorkflowTableRow.



20
21
22
23
24
25
26
# File 'lib/retab/tables/workflow_table_row.rb', line 20

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @id = hash[:id]
  @data = hash[:data] || {}
  @position = hash[:position]
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



14
15
16
# File 'lib/retab/tables/workflow_table_row.rb', line 14

def data
  @data
end

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/retab/tables/workflow_table_row.rb', line 14

def id
  @id
end

#positionObject

Returns the value of attribute position.



14
15
16
# File 'lib/retab/tables/workflow_table_row.rb', line 14

def position
  @position
end