Method: TableGen#column
- Defined in:
- lib/tablegen.rb
#column(index) {|Column column| ... } ⇒ Column
Yields and returns the column at the specified index.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/tablegen.rb', line 52 def column(index) unless col = @columns[index] if @columns.count < index # create columns so the holes are not filled with nil (@columns.count..index).each {|i| column i } end col = Column.new index @columns[index] = col end yield col if block_given? col end |