module Money::Currency::Enumeration
Included Modules
- Enumerable(Money::Currency)
Defined in:
money/currency/enumeration.crInstance Method Summary
-
#[](key : String | Symbol) : Currency
Lookup a currency with given key an returns a
Currencyinstance on success, raisesUnknownCurrencyErrorotherwise. -
#[]?(key : String | Symbol) : Currency | Nil
Lookup a currency with given key an returns a
Currencyinstance on success,nilotherwise. - #all : Array(Currency)
-
#each(&) : Nil
Must yield this collection's elements to the block.
-
#find(key : String | Symbol) : Currency
Lookup a currency with given key an returns a
Currencyinstance on success, raisesUnknownCurrencyErrorotherwise. -
#find?(key : String | Symbol) : Currency | Nil
Lookup a currency with given key an returns a
Currencyinstance on success,nilotherwise.
Instance Method Detail
Lookup a currency with given key an returns a Currency instance on
success, raises UnknownCurrencyError otherwise.
Money::Currency.find("EUR") # => #<Money::Currency @id="eur">
Money::Currency.find("FOO") # => raises UnknownCurrencyError
Lookup a currency with given key an returns a Currency instance on
success, nil otherwise.
Money::Currency.find("EUR") # => #<Money::Currency @id="eur">
Money::Currency.find("FOO") # => nil
Must yield this collection's elements to the block.
Lookup a currency with given key an returns a Currency instance on
success, raises UnknownCurrencyError otherwise.
Money::Currency.find("EUR") # => #<Money::Currency @id="eur">
Money::Currency.find("FOO") # => raises UnknownCurrencyError
Lookup a currency with given key an returns a Currency instance on
success, nil otherwise.
Money::Currency.find("EUR") # => #<Money::Currency @id="eur">
Money::Currency.find("FOO") # => nil