Class: Retab::WorkflowTableSortRule
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTableSortRule
- Defined in:
- lib/retab/tables/workflow_table_sort_rule.rb
Constant Summary collapse
- HASH_ATTRS =
{ column: :column, direction: :direction }.freeze
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#direction ⇒ Object
Returns the value of attribute direction.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTableSortRule
constructor
A new instance of WorkflowTableSortRule.
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
#column ⇒ Object
Returns the value of attribute column.
13 14 15 |
# File 'lib/retab/tables/workflow_table_sort_rule.rb', line 13 def column @column end |
#direction ⇒ Object
Returns the value of attribute direction.
13 14 15 |
# File 'lib/retab/tables/workflow_table_sort_rule.rb', line 13 def direction @direction end |