Sha256: edc709dcbf5a15895deede99c73512ef0351c9cd6e1e090be72725c6e3ef88d2

Contents?: true

Size: 592 Bytes

Versions: 9

Compression:

Stored size: 592 Bytes

Contents

module I18n
  module Backend
    class Simple
      module Implementation

        # Extend the Simple backend with a custom `available_translations` method
        # returning a combined hash with all translations from this backend
        def available_translations
          # simple backend is lazy loaded (woken up by first I18n.t() call)
          # wake it up if it's still sleeping
          send(:init_translations) unless initialized?

          # nested Hash with all translations
          send(:translations)
        end
      end

      include Implementation
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exvo_globalize-0.6.0 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.6 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.5 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.4 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.3 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.2 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.1 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.5.0 lib/exvo_globalize/backend/simple.rb
exvo_globalize-0.4.0 lib/exvo_globalize/backend/simple.rb