Sha256: cf02081048a00ebb2f3af1bf5ff269812325c6e736a113923cc58dc5537ef303
Contents?: true
Size: 508 Bytes
Versions: 11
Compression:
Stored size: 508 Bytes
Contents
require 'genesis_ruby/utils/money/base/strategy' module GenesisRuby module Utils module Money module Conversions # Amount To Exponent Money Conversion Strategy class AmountToExponent < GenesisRuby::Utils::Money::Base::Strategy # Convert amount to ISO-4217 minor currency unit def convert format( '%d', (amount * parse_amount(10**currency_exponent)) ) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems