Module: TableStructure::Schema::DSL::ColumnConverter

Defined in:
lib/table_structure/schema/dsl/column_converter.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  header: true,
  row: true
}.freeze

Instance Method Summary collapse

Instance Method Details

#column_converter(name, callable, **options) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/table_structure/schema/dsl/column_converter.rb', line 12

def column_converter(name, callable, **options)
  options = DEFAULT_OPTIONS.merge(options)
  column_converters[name] = {
    callable: callable,
    options: options
  }
  nil
end

#column_convertersObject



21
22
23
# File 'lib/table_structure/schema/dsl/column_converter.rb', line 21

def column_converters
  @table_structure_schema_column_converters__ ||= {}
end