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.
10
11
12
13
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 10
def initialize(name,options={})
@name = name
@options = options
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8
9
10
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 8
def name
@name
end
|
#options ⇒ Object
Returns the value of attribute options.
8
9
10
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 8
def options
@options
end
|
Instance Method Details
#[](key) ⇒ Object
23
24
25
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 23
def [](key)
current_translations[key]
end
|
#available_locales ⇒ Object
19
20
21
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 19
def available_locales
[]
end
|
#plural(*keys) ⇒ Object
27
28
29
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 27
def plural(*keys)
current_translations.plural(*keys)
end
|
#pluralisation_rule ⇒ Object
15
16
17
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 15
def pluralisation_rule
nil
end
|
#reload ⇒ Object
31
32
33
|
# File 'lib/fast_gettext/translation_repository/base.rb', line 31
def reload
true
end
|