Methods

Files

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.