Class: TableStructure::Schema::Definition::ColumnConverter

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/table_structure/schema/definition/column_converter.rb

Instance Method Summary collapse

Constructor Details

#initialize(header: true, body: true, &block) ⇒ ColumnConverter

Returns a new instance of ColumnConverter.



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

def initialize(
  header: true,
  body: true,
  &block
)
  @applicable_to_header = header
  @applicable_to_body = body
  @callable = block
end

Instance Method Details

#applicable_to_body?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/table_structure/schema/definition/column_converter.rb', line 25

def applicable_to_body?
  !!@applicable_to_body
end

#applicable_to_header?Boolean

Returns:

  • (Boolean)


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

def applicable_to_header?
  !!@applicable_to_header
end