Module: FastGettext::TranslationRepository

### Home Classes Methods

### In Files

- lib/fast_gettext/translation_repository.rb
- lib/fast_gettext/translation_repository/base.rb
- lib/fast_gettext/translation_repository/chain.rb
- lib/fast_gettext/translation_repository/db.rb
- lib/fast_gettext/translation_repository/logger.rb
- lib/fast_gettext/translation_repository/mo.rb
- lib/fast_gettext/translation_repository/po.rb
- lib/fast_gettext/translation_repository/yaml.rb

### Namespace

- CLASS FastGettext::TranslationRepository::Base
- CLASS FastGettext::TranslationRepository::Chain
- CLASS FastGettext::TranslationRepository::Db
- CLASS FastGettext::TranslationRepository::Logger
- CLASS FastGettext::TranslationRepository::Mo
- CLASS FastGettext::TranslationRepository::Po
- CLASS FastGettext::TranslationRepository::Yaml

### Methods

- #build

### Class/Module Index

Quicksearch

- FastGettext
- FastGettext::GetText
- FastGettext::GetText::MOFile
- FastGettext::GetText::MOFile::HeaderRev1
- FastGettext::GetText::MOFile::InvalidFormat
- FastGettext::GetText::PoParser
- FastGettext::MoFile
- FastGettext::PoFile
- FastGettext::Storage
- FastGettext::Storage::NoTextDomainConfigured
- FastGettext::Translation
- FastGettext::TranslationMultidomain
- FastGettext::TranslationRepository
- FastGettext::TranslationRepository::Base
- FastGettext::TranslationRepository::Chain
- FastGettext::TranslationRepository::Db
- FastGettext::TranslationRepository::Logger
- FastGettext::TranslationRepository::Mo
- FastGettext::TranslationRepository::Po
- FastGettext::TranslationRepository::Yaml
- String
- TranslationKey
- TranslationText

No matching classes.

# FastGettext::TranslationRepository

Responsibility:

    - decide which repository to choose from given input

### Public Instance Methods

build(name, options) click to toggle source

only single-word types supported atm (mytype works, MyType will not)

    # File lib/fast_gettext/translation_repository.rb, line 8
    def build(name, options)
      type = options[:type] || :mo
      class_name = type.to_s.capitalize
      unless FastGettext::TranslationRepository.constants.map{|c|c.to_s}.include?(class_name)
        require "fast_gettext/translation_repository/#{type}"
      end
      eval(class_name).new(name,options)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.