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_bank : Bank
Each
Money
object is associated to a bank object, which is responsible for currency exchange. -
#default_bank=(default_bank : Bank)
Each
Money
object is associated to a bank object, which is responsible for currency exchange. -
#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_rate_store : Currency::RateStore
Default currency rate store used by
Bank
objects. -
#default_rate_store=(default_rate_store : Currency::RateStore)
Default currency rate store used by
Bank
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
Each Money
object is associated to a bank object, which is responsible
for currency exchange. This property allows you to specify the default
bank object. The default value for this property is an instance of
Bank::VariableExchange
, which allows one to specify custom exchange rates.
Each Money
object is associated to a bank object, which is responsible
for currency exchange. This property allows you to specify the default
bank object. The default value for this property is an instance of
Bank::VariableExchange
, which allows one to specify custom exchange rates.
Default currency for creating new Money
object.
Default currency for creating new Money
object.
Default currency rate store used by Bank
objects. It defaults to using an
in-memory, concurrency-safe, store instance for storing exchange rates.
Default currency rate store used by Bank
objects. It defaults to using an
in-memory, concurrency-safe, store instance for storing exchange rates.