Method: DBA::TableSchema#initialize
- Defined in:
- lib/dba/table_schema.rb
#initialize(database, table_name) ⇒ TableSchema
2 3 4 5 6 7 8 |
# File 'lib/dba/table_schema.rb', line 2 def initialize(database, table_name) @schema = database.schema(table_name) @column_type_hash = @schema.each_with_object({}) do |(column_name, column_info), hash| hash[column_name] = column_info[:type] end end |