Class: ISO3166::Configuration
- Inherits:
-
Object
- Object
- ISO3166::Configuration
- Defined in:
- lib/countries/configuration.rb
Instance Attribute Summary collapse
-
#loaded_locales ⇒ Object
Returns the value of attribute loaded_locales.
- #locales ⇒ Object
Instance Method Summary collapse
-
#enable_currency_extension! ⇒ Object
Enables the integration with the Money gem.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 |
# File 'lib/countries/configuration.rb', line 25 def initialize @loaded_locales = [] end |
Instance Attribute Details
#loaded_locales ⇒ Object
Returns the value of attribute loaded_locales.
22 23 24 |
# File 'lib/countries/configuration.rb', line 22 def loaded_locales @loaded_locales end |
#locales ⇒ Object
29 30 31 |
# File 'lib/countries/configuration.rb', line 29 def locales @locales ||= default_locales end |
Instance Method Details
#enable_currency_extension! ⇒ Object
Enables the integration with the Money gem
Please note that it requires you to add “money” gem to your gemfile.
gem "money", "~> 6.9"
WARNING if you have a top level class named Money
you will conflict with this gem.
46 47 48 49 |
# File 'lib/countries/configuration.rb', line 46 def enable_currency_extension! require 'countries/country/currency_methods' ISO3166::Country.prepend(ISO3166::CountryCurrencyMethods) end |