Method: Tabl::Table#initialize

Defined in:
lib/tabl/table.rb

#initialize(args = {}) {|_self| ... } ⇒ Table

Returns a new instance of Table.

Yields:

  • (_self)

Yield Parameters:

  • _self (Tabl::Table)

    the object that the method was called on



6
7
8
9
10
11
12
13
# File 'lib/tabl/table.rb', line 6

def initialize(args = {})
  @base_columns = {}
  add_base_columns(args[:base_columns] || {})
  @formats = {}
  @columns = {}
  self.columns=(args[:columns] || [])
  yield self if block_given?
end