class
Money::Context
- Money::Context
- Reference
- Object
Overview
Context
class holding global settings for Money
objects.
Each Fiber
has its own Fiber#money_context
instance.
See also Money.same_context_wrapper
and Money.spawn_with_same_context
.
Defined in:
money/context.crInstance Method Summary
-
#default_currency : Currency
Default currency for creating new
Money
object. -
#default_currency=(currency_code : String | Symbol)
Default currency for creating new
Money
object. -
#default_currency=(default_currency : Currency)
Default currency for creating new
Money
object. -
#default_exchange : Currency::Exchange
Each
Money
object is associated to a currency exchange object. -
#default_exchange=(default_exchange : Currency::Exchange)
Each
Money
object is associated to a currency exchange object. -
#default_rate_provider : Currency::RateProvider
Default currency rate provider used by
Currency::Exchange
objects. -
#default_rate_provider=(default_rate_provider : Currency::RateProvider)
Default currency rate provider used by
Currency::Exchange
objects. -
#default_rate_store : Currency::RateStore
Default currency rate store used by
Currency::Exchange
objects. -
#default_rate_store=(default_rate_store : Currency::RateStore)
Default currency rate store used by
Currency::Exchange
objects. -
#infinite_precision=(infinite_precision : Bool)
Use this to control infinite precision cents.
-
#infinite_precision? : Bool
Use this to control infinite precision cents.
-
#rounding_mode : Number::RoundingMode
Default rounding mode.
-
#rounding_mode=(rounding_mode : Number::RoundingMode)
Default rounding mode.
Instance Method Detail
Default currency for creating new Money
object.
Default currency for creating new Money
object.
Each Money
object is associated to a currency exchange object.
This property allows you to specify the default exchange object.
The default value for this property is an instance of
Currency::Exchange
, which allows one to specify custom exchange rates.
Each Money
object is associated to a currency exchange object.
This property allows you to specify the default exchange object.
The default value for this property is an instance of
Currency::Exchange
, which allows one to specify custom exchange rates.
Default currency rate provider used by Currency::Exchange
objects.
Default currency rate provider used by Currency::Exchange
objects.
Default currency rate store used by Currency::Exchange
objects.
It defaults to using an in-memory, concurrency-safe, store instance for
storing exchange rates.
Default currency rate store used by Currency::Exchange
objects.
It defaults to using an in-memory, concurrency-safe, store instance for
storing exchange rates.