Class: Retab::WorkflowTableSortRule

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

Constant Summary collapse

HASH_ATTRS =
{
  column: :column,
  direction: :direction
}.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) ⇒ WorkflowTableSortRule

Returns a new instance of WorkflowTableSortRule.



18
19
20
21
22
23
# File 'lib/retab/tables/workflow_table_sort_rule.rb', line 18

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @column = hash[:column]
  @direction = hash[:direction].nil? ? "asc" : hash[:direction]
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



13
14
15
# File 'lib/retab/tables/workflow_table_sort_rule.rb', line 13

def column
  @column
end

#directionObject

Returns the value of attribute direction.



13
14
15
# File 'lib/retab/tables/workflow_table_sort_rule.rb', line 13

def direction
  @direction
end