Class: Money::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/money/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



19
20
21
22
23
# File 'lib/money/config.rb', line 19

def initialize
  @default_currency = nil
  @legacy_json_format = false
  @legacy_deprecations = false
end

Instance Attribute Details

#default_currencyObject

Returns the value of attribute default_currency.



5
6
7
# File 'lib/money/config.rb', line 5

def default_currency
  @default_currency
end

#legacy_deprecationsObject

Returns the value of attribute legacy_deprecations.



5
6
7
# File 'lib/money/config.rb', line 5

def legacy_deprecations
  @legacy_deprecations
end

#legacy_json_formatObject

Returns the value of attribute legacy_json_format.



5
6
7
# File 'lib/money/config.rb', line 5

def legacy_json_format
  @legacy_json_format
end

Instance Method Details

#legacy_default_currency!Object



7
8
9
# File 'lib/money/config.rb', line 7

def legacy_default_currency!
  @default_currency ||= Money::NULL_CURRENCY
end

#legacy_deprecations!Object



11
12
13
# File 'lib/money/config.rb', line 11

def legacy_deprecations!
  @legacy_deprecations = true
end

#legacy_json_format!Object



15
16
17
# File 'lib/money/config.rb', line 15

def legacy_json_format!
  @legacy_json_format = true
end