module Multicash::Utils
Public Instance Methods
calc_bae(iban)
click to toggle source
# File lib/multicash/utils.rb, line 21 def calc_bae iban iban[4, 8] end
print_currency(value, lenght)
click to toggle source
# File lib/multicash/utils.rb, line 12 def print_currency value, lenght sprintf("%#{lenght}.2f", value) end
print_currency_with_comma(value, lenght)
click to toggle source
# File lib/multicash/utils.rb, line 16 def print_currency_with_comma value, lenght value = sprintf("%#{lenght}.2f", value) value_with_comma = value.gsub('.', ',') end
print_number(value, lenght)
click to toggle source
# File lib/multicash/utils.rb, line 8 def print_number value, lenght sprintf("%#{lenght}d", value) end
print_string(value, lenght, fill_with = '')
click to toggle source
# File lib/multicash/utils.rb, line 4 def print_string value, lenght, fill_with = '' sprintf("%#{fill_with}#{lenght}s", value) end