Module: Maguire
- Defined in:
- lib/maguire.rb,
lib/maguire/hash.rb,
lib/maguire/locale.rb,
lib/maguire/version.rb,
lib/maguire/currency.rb,
lib/maguire/data_set.rb
Defined Under Namespace
Modules: Hash Classes: Currency, DataSet, Locale
Constant Summary collapse
- VERSION =
'0.2.3'
Class Attribute Summary collapse
-
.data_paths ⇒ Object
Returns the value of attribute data_paths.
-
.default_locale ⇒ Object
Returns the value of attribute default_locale.
-
.locale_paths ⇒ Object
Returns the value of attribute locale_paths.
-
.root_path ⇒ Object
Returns the value of attribute root_path.
Class Method Summary collapse
Class Attribute Details
.data_paths ⇒ Object
Returns the value of attribute data_paths.
15 16 17 |
# File 'lib/maguire.rb', line 15 def data_paths @data_paths end |
.default_locale ⇒ Object
Returns the value of attribute default_locale.
15 16 17 |
# File 'lib/maguire.rb', line 15 def default_locale @default_locale end |
.locale_paths ⇒ Object
Returns the value of attribute locale_paths.
15 16 17 |
# File 'lib/maguire.rb', line 15 def locale_paths @locale_paths end |
.root_path ⇒ Object
Returns the value of attribute root_path.
15 16 17 |
# File 'lib/maguire.rb', line 15 def root_path @root_path end |
Class Method Details
.format(money, options = {}) ⇒ Object
30 31 32 33 34 |
# File 'lib/maguire.rb', line 30 def format(money, ={}) locale = Locale.lookup([:locale] || Maguire.default_locale) locale.format(money[:value], money[:currency], ) end |
.reset_data_paths ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/maguire.rb', line 17 def reset_data_paths data_paths.clear data_paths << root_path + 'iso_data/seed_layer' << root_path + 'iso_data/patch_layer' << root_path + 'iso_data/symbol_layer' end |
.reset_locale_paths ⇒ Object
25 26 27 28 |
# File 'lib/maguire.rb', line 25 def reset_locale_paths locale_paths.clear locale_paths << root_path + 'locale' end |