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.4.4 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.5 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.7 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.8 lib/fast_gettext/translation_repository.rb
grosser-fast_gettext-0.4.9 lib/fast_gettext/translation_repository.rb
fast_gettext-0.4.17 lib/fast_gettext/translation_repository.rb
fast_gettext-0.4.16 lib/fast_gettext/translation_repository.rb