Module: Jirafe::DataHelper

Instance Method Summary collapse

Instance Method Details

#format_amount(amount) ⇒ Object



3
4
5
6
# File 'lib/jirafe/data_helper.rb', line 3

def format_amount(amount)
  return nil if amount.nil?
  "%01.4f" % amount
end

#format_discount_amount(amount) ⇒ Object



8
9
10
11
# File 'lib/jirafe/data_helper.rb', line 8

def format_discount_amount(amount)
  return nil if amount.nil?
  format_amount(amount.abs)
end