class FixedWidthColumns::Formatter

Public Instance Methods

format(thing) click to toggle source
# File lib/fixed_width_columns/formatter.rb, line 11
def format thing
  columns.map { |col| col.string_for thing }.join
end
headers() click to toggle source
# File lib/fixed_width_columns/formatter.rb, line 7
def headers
  columns.map { |col| col.format(col.name.to_s, :padding => ' ') }.join
end