Module: TableStructure::Schema::DSL::ColumnBuilder
- Defined in:
- lib/table_structure/schema/dsl/column_builder.rb
Instance Method Summary collapse
- #column_builder(name, header: true, body: true, &block) ⇒ Object (also: #column_converter)
- #column_builders ⇒ Object
Instance Method Details
#column_builder(name, header: true, body: true, &block) ⇒ Object Also known as: column_converter
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/table_structure/schema/dsl/column_builder.rb', line 7 def column_builder( name, header: true, body: true, &block ) column_builders[name] = ::TableStructure::Utils::TypedProc.new( types: { header: !!header, body: !!body }.select { |_k, v| v }.keys, &block ) nil end |
#column_builders ⇒ Object
21 22 23 |
# File 'lib/table_structure/schema/dsl/column_builder.rb', line 21 def column_builders @__column_builders__ ||= {} end |