abstract class Money::Bank

Direct Known Subclasses

Defined in:

money/bank.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

[View source]

Class Method Detail

def self.default_store : Currency::RateStore #

It defaults to using an in-memory, thread safe store instance for storing exchange rates.


[View source]
def self.default_store=(default_store : Currency::RateStore) #

It defaults to using an in-memory, thread safe store instance for storing exchange rates.


[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.


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

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


[View source]