Module: TableStructure::Schema::DSL::RowBuilder

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

Instance Method Summary collapse

Instance Method Details

#row_builder(name, enabled_row_types: %i[array hash],, &block) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/table_structure/schema/dsl/row_builder.rb', line 7

def row_builder(
  name,
  enabled_row_types: %i[array hash],
  &block
)
  row_builders[name] =
    ::TableStructure::Utils::TypedProc.new(
      types: enabled_row_types,
      &block
    )
  nil
end

#row_buildersObject



20
21
22
# File 'lib/table_structure/schema/dsl/row_builder.rb', line 20

def row_builders
  @__row_builders__ ||= {}
end