Module: DataMapper::Support::String::ClassMethods
- Defined in:
- lib/data_mapper/support/string.rb
Instance Method Summary collapse
-
#translate(value) ⇒ Object
Overwrite this method to provide your own translations.
- #translations ⇒ Object
Instance Method Details
#translate(value) ⇒ Object
Overwrite this method to provide your own translations.
12 13 14 |
# File 'lib/data_mapper/support/string.rb', line 12 def translate(value) translations[value] || value end |
#translations ⇒ Object
16 17 18 |
# File 'lib/data_mapper/support/string.rb', line 16 def translations @translations || @translations = {} end |