Module WhittakerTech::Midas::Coin::Converter ¶
Converter is a reserved module for future currency conversion logic.
It exists as a clear architectural placeholder to separate concerns:
Related modules:
Arithmetic: Integer arithmetic on minor unitsAllocation: Per-unit pricing interpretationConverter: Cross-currency rate conversion (planned)
When implemented, Converter will handle:
- Exchange rate sources (live API, snapshot, historical)
- Historical conversions with a specific timestamp
-
Regulatory rounding rules per jurisdiction
-
@note All methods in this module raise
NotImplementedErrorintentionally. Use the Money gem's exchange rate infrastructure directly for now. -
@since 0.1.0
Public Instance Methods¶
convert_to(currency_code, at: = Time.current, using: = nil) ¶
Converts this Coin to another currency.
- @param
currency_code[String] target ISO 4217 currency code - @param
at[Time] the rate timestamp (for historical conversions) - @param
using[Object, nil] exchange rate provider / bank override - @raise [NotImplementedError] — not yet implemented
- @return [Coin]
- @since 0.1.0