def align_column(column_number, alignment)
      set_alignment = Proc.new do |row, column_number_block, alignment_block|
        cell = row.find do |cell_row|
          row[0...row.index(cell_row)].map {|c| c.is_a?(Hash) ? c[:colspan] || 1 : 1}.inject(0, &:+) == column_number_block - 1
        end
        row[row.index(cell)] = hashify(cell, {:align => alignment_block}) if cell and not(cell.is_a?(Hash) && cell[:colspan].to_i > 0)
      end
      rows.each do |row|
        next if row == :separator
        set_alignment.call(row, column_number, alignment)
      end
      set_alignment.call(foot, column_number, alignment) if foot
      return self
    end
def align_column(column_number, alignment)
      set_alignment = Proc.new do |row, column_number_block, alignment_block|
        cell = row.find do |cell_row|
          row[0...row.index(cell_row)].map {|c| c.is_a?(Hash) ? c[:colspan] || 1 : 1}.inject(0, &:+) == column_number_block - 1
        end
        row[row.index(cell)] = hashify(cell, {:align => alignment_block}) if cell and not(cell.is_a?(Hash) && cell[:colspan].to_i > 0)
      end
      rows.each do |row|
        next if row == :separator
        set_alignment.call(row, column_number, alignment)
      end
      set_alignment.call(foot, column_number, alignment) if foot
      return self
    end
Aligns the cells and the footer of a column.

    table = Text::Table.new :rows => [%w(a bb), %w(aa bbb), %w(aaa b)]
    puts table

    #    +-----+-----+
    #    | a   | bb  |
    #    | aa  | bbb |
    #    | aaa | b   |
    #    +-----+-----+

    table.align_column 2, :right

    #    +-----+-----+
    #    | a   |  bb |
    #    | aa  | bbb |
    #    | aaa |   b |
    #    +-----+-----+

  Note that headers, spanned cells and cells with explicit alignments are not affected by <tt>align_column</tt>.