Sha256: fdd7b74bb716cbfc2adcf7948f9614393de86e6a95b75004e48bc5d9adcdad86

Contents?: true

Size: 494 Bytes

Versions: 1

Compression:

Stored size: 494 Bytes

Contents

module FastGettext
  module Storage
    [:locale,:text_domain,:available_locales].each do |method|
      key = "FastGettext.#{method}"
      define_method method do
        Thread.current[key]
      end
      define_method "#{method}=" do |value|
        Thread.current[key] = value
      end
    end

    #NOT THREADSAFE, for speed/caching
    @@text_domains = {}
    
    def text_domains
      @@text_domains
    end

    def text_domains=(value)
      @@text_domains=value
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grosser-fast_gettext-0.1.0 lib/fast_gettext/storage.rb