Class: GenesisRuby::Utils::Money::Conversions::AmountToExponent
- Inherits:
-
Base::Strategy
- Object
- Base::Strategy
- GenesisRuby::Utils::Money::Conversions::AmountToExponent
- Defined in:
- lib/genesis_ruby/utils/money/conversions/amount_to_exponent.rb
Overview
Amount To Exponent Money Conversion Strategy
Instance Attribute Summary
Attributes inherited from Base::Strategy
#amount, #currency, #currency_exponent
Instance Method Summary collapse
-
#convert ⇒ Object
Convert amount to ISO-4217 minor currency unit.
Methods inherited from Base::Strategy
Constructor Details
This class inherits a constructor from GenesisRuby::Utils::Money::Base::Strategy
Instance Method Details
#convert ⇒ Object
Convert amount to ISO-4217 minor currency unit
13 14 15 |
# File 'lib/genesis_ruby/utils/money/conversions/amount_to_exponent.rb', line 13 def convert format '%d', amount * parse_amount(10**currency_exponent) end |