def format(indexes, params = {}, &block)
      [*indexes].each do |index|
        index = parse_index(index)
        if index
          component[:formatters][index] = (params[:using] or block)
          component[:formatters][index] ||= proc do |ctx|
            params[:with] % ctx.value
          end
        else
          format_null params, &block
        end
      end
    end
def format(indexes, params = {}, &block)
      [*indexes].each do |index|
        index = parse_index(index)
        if index
          component[:formatters][index] = (params[:using] or block)
          component[:formatters][index] ||= proc do |ctx|
            params[:with] % ctx.value
          end
        else
          format_null params, &block
        end
      end
    end
Sets a component to format a column.

 The component must respond to +call+ with the column value
 as the arguments and return a color or +nil+ if default color should be used.
 A block can also be used.

 === Args

 +indexes+::
   The column indexes or its aliases
 +params+::
   A hash with params in case a block is not given:
     - :using defines the component to use
     - :with defines the format to use (to use the same format for all columns)

 === Example

   table.format :value, :with => '%.2f'
   table.format [:value, :total], :with => '%.2f'