Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/i18n/complements/core_extension.rb
Overview
TODO: Rewrite this “not DRY” code
Instance Method Summary collapse
- #localize(options = {}) ⇒ Object (also: #l)
- #to_currency ⇒ Object
- #translate(options = {}) ⇒ Object (also: #t)
Instance Method Details
#localize(options = {}) ⇒ Object Also known as: l
9 10 11 |
# File 'lib/i18n/complements/core_extension.rb', line 9 def localize( = {}) I18n.localize(self, ) end |
#to_currency ⇒ Object
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( = {}) I18n.translate(self, ) end |