module

FXCalculator::Utils

Instance methods

config_from_opts(config_path : Path | String | Nil, rate_store_name : String | Nil, rate_store_opts : String | Nil, rate_provider_name : String | Nil, rate_provider_opts : String | Nil, currency_code : String | Nil)
Source
parse_money_exchanged(str : String) : Tuple(Money, Money)

Parses a string representing a money value along with target currency, if present, and returns it as a tuple of a Money (original value) and Money (exchanged to the target currency).

Source
parse_money_with_currency(str : String) : Tuple(Money, Money::Currency)

Parses a string representing a money value along with target currency, if present, and returns it as a tuple of Money and Money::Currency.

Source