Class: FastGettext::TranslationRepository::Base
- Inherits:
-
Object
- Object
- FastGettext::TranslationRepository::Base
show all
- 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 Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(name, options = {}) ⇒ Base
Returns a new instance of Base.
11
12
13
14
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 11
def initialize(name, options = {})
@name = name
@options = options
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
9
10
11
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 9
def name
@name
end
|
#options ⇒ Object
Returns the value of attribute options.
9
10
11
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 9
def options
@options
end
|
Instance Method Details
#[](key) ⇒ Object
24
25
26
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 24
def [](key)
current_translations[key]
end
|
#available_locales ⇒ Object
20
21
22
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 20
def available_locales
[]
end
|
#plural(*keys) ⇒ Object
28
29
30
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 28
def plural(*keys)
current_translations.plural(*keys)
end
|
#pluralisation_rule ⇒ Object
16
17
18
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 16
def pluralisation_rule
nil
end
|
#reload ⇒ Object
32
33
34
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 32
def reload
true
end
|