Class: Retab::WorkflowTableSchemaResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTableSchemaResponse
- Defined in:
- lib/retab/tables/workflow_table_schema_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ table_id: :table_id, columns: :columns }.freeze
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#table_id ⇒ Object
Returns the value of attribute table_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTableSchemaResponse
constructor
A new instance of WorkflowTableSchemaResponse.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTableSchemaResponse
Returns a new instance of WorkflowTableSchemaResponse.
18 19 20 21 22 23 |
# File 'lib/retab/tables/workflow_table_schema_response.rb', line 18 def initialize(json) super() hash = self.class.normalize(json) @table_id = hash[:table_id] @columns = (hash[:columns] || []).map { |item| item ? Retab::WorkflowTableColumn.new(item) : nil } end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
13 14 15 |
# File 'lib/retab/tables/workflow_table_schema_response.rb', line 13 def columns @columns end |
#table_id ⇒ Object
Returns the value of attribute table_id.
13 14 15 |
# File 'lib/retab/tables/workflow_table_schema_response.rb', line 13 def table_id @table_id end |