Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n/complements/core_extension.rb

Overview

TODO: Rewrite this “not DRY” code

Instance Method Summary collapse

Instance Method Details

#localize(options = {}) ⇒ Object Also known as: l



9
10
11
# File 'lib/i18n/complements/core_extension.rb', line 9

def localize(options = {})
  I18n.localize(self, options)
end

#to_currencyObject



14
15
16
# File 'lib/i18n/complements/core_extension.rb', line 14

def to_currency
  I18n.currencies(self)
end

#translate(options = {}) ⇒ Object Also known as: t



4
5
6
# File 'lib/i18n/complements/core_extension.rb', line 4

def translate(options = {})
  I18n.translate(self, options)
end