Module: Autochthon::Backend::FetchingAll

Includes:
I18n::Backend::Flatten
Included in:
Simple
Defined in:
lib/autochthon/backend/fetching_all.rb

Instance Method Summary collapse

Instance Method Details

#all(locales = available_locales) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/autochthon/backend/fetching_all.rb', line 6

def all(locales = available_locales)
  locales.inject([]) do |out, locale|
    flatten_keys(all_for_locale(locale), false) do |key, value|
      out << {key: key, value: value, locale: locale}
    end
    out
  end
end

#all_for_locale(locale) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/autochthon/backend/fetching_all.rb', line 15

def all_for_locale(locale)
  raise NotImplementedError
end