abstract class Money::Bank

Direct Known Subclasses

Defined in:

money/bank.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(store : Money::Currency::RateStore | Nil = nil) #

[View source]

Instance Method Detail

abstract def exchange(from : Money, to : Currency) : Money #

Exchanges the given Money object to a new Money object in to Currency.


[View source]
def store : Currency::RateStore #

An exchange Currency::RateStore object, used to persist exchange rate pairs.

NOTE Will return Money.default_rate_store if set to nil (the default).


[View source]
def store=(store : Currency::RateStore | Nil) #

An exchange Currency::RateStore object, used to persist exchange rate pairs.

NOTE Will return Money.default_rate_store if set to nil (the default).


[View source]