module BillTrap::Helpers
Public Instance Methods
format_date(d, format_str=BillTrap::Config['date_format'])
click to toggle source
# File lib/billtrap/helpers.rb, line 8 def format_date d, format_str=BillTrap::Config['date_format'] d.strftime(format_str) end
format_money(m, opts=BillTrap::Config['currency_format'])
click to toggle source
# File lib/billtrap/helpers.rb, line 12 def format_money m, opts=BillTrap::Config['currency_format'] m.format(opts) end
is_i?(val)
click to toggle source
# File lib/billtrap/helpers.rb, line 4 def is_i? val !!(val.is_a? Integer or val =~ /^\d+$/) end