Class: FastGettext::TranslationRepository::Base
- Inherits:
-
Object
- Object
- FastGettext::TranslationRepository::Base
- Defined in:
- lib/fast_gettext/translation_repository/base.rb
Overview
Responsibility:
- base for all repositories
- fallback as empty repository, that cannot translate anything but does not crash
Instance Method Summary collapse
- #[](key) ⇒ Object
- #available_locales ⇒ Object
-
#initialize(name, options = {}) ⇒ Base
constructor
A new instance of Base.
- #plural(*keys) ⇒ Object
- #pluralisation_rule ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/fast_gettext/translation_repository/base.rb', line 7 def initialize(name,={}) @name = name @options = end |
Instance Method Details
#[](key) ⇒ Object
20 21 22 |
# File 'lib/fast_gettext/translation_repository/base.rb', line 20 def [](key) current_translations[key] end |
#available_locales ⇒ Object
16 17 18 |
# File 'lib/fast_gettext/translation_repository/base.rb', line 16 def available_locales [] end |
#plural(*keys) ⇒ Object
24 25 26 |
# File 'lib/fast_gettext/translation_repository/base.rb', line 24 def plural(*keys) current_translations.plural(*keys) end |
#pluralisation_rule ⇒ Object
12 13 14 |
# File 'lib/fast_gettext/translation_repository/base.rb', line 12 def pluralisation_rule nil end |