Module: I18n::Backend::RemoteBackend::Implementation
- Includes:
- Base
- Included in:
- I18n::Backend::RemoteBackend
- Defined in:
- lib/i18n/backend/remote_backend/implementation.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
Returns the value of attribute store.
Instance Method Summary collapse
- #available_locales ⇒ Object
- #init_translations ⇒ Object
- #initialize ⇒ Object
- #initialized? ⇒ Boolean
- #store_translations(locale, data, _options = {}) ⇒ Object
- #translations ⇒ Object
Instance Attribute Details
#store ⇒ Object
Returns the value of attribute store.
11 12 13 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 11 def store @store end |
Instance Method Details
#available_locales ⇒ Object
26 27 28 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 26 def available_locales @store.keys.map(&:to_sym) end |
#init_translations ⇒ Object
34 35 36 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 34 def init_translations @store end |
#initialize ⇒ Object
13 14 15 16 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 13 def initialize @store = {} I18n.enforce_available_locales = false end |
#initialized? ⇒ Boolean
18 19 20 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 18 def initialized? !@store.nil? end |
#store_translations(locale, data, _options = {}) ⇒ Object
22 23 24 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 22 def store_translations(locale, data, = {}) @store[locale] = data end |
#translations ⇒ Object
30 31 32 |
# File 'lib/i18n/backend/remote_backend/implementation.rb', line 30 def translations @store end |