Sha256: f5d941a1b60778ee5b26b243aeb967a6bb27460546a1eb25c4ba161162cdc35a

Contents?: true

Size: 429 Bytes

Versions: 27

Compression:

Stored size: 429 Bytes

Contents

module FastGettext
  # Responsibility:
  #  - decide which repository to choose from given input
  module TranslationRepository
    extend self

    # only single-word types supported atm (mytype works, MyType will not)
    def build(name,options)
      type = options[:type] || :mo
      require "fast_gettext/translation_repository/#{type}"
      klas = eval(type.to_s.capitalize)
      klas.new(name,options)
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
grosser-fast_gettext-0.2.11 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.0 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.1 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.2 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.3 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.4 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.5 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.6 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.7 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.3.8 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.0 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.10 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.11 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.12 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.13 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.14 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.15 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.16 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.2 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.3 lib/fast_gettext/translation_repository.rb