Sha256: b1daafba8ef7eb8af44b6dbf2447dba2645c5ca35c9d985558d132f08d17e0da
Contents?: true
Size: 825 Bytes
Versions: 1
Compression:
Stored size: 825 Bytes
Contents
# -*- encoding : utf-8 -*- module Phrase autoload :Config, 'phrase/config' class << self def config Thread.current[:phrase_config] ||= Phrase::Config.new end def config=(value) Thread.current[:phrase_config] = value end %w(backend default_locale available_locales prefix suffix).each do |method| module_eval <<-DELEGATORS, __FILE__, __LINE__ + 1 def #{method} config.#{method} end DELEGATORS module_eval <<-DELEGATORS, __FILE__, __LINE__ + 1 def #{method}=(value) config.#{method} = (value) end DELEGATORS end end autoload :Extensions, 'phrase/extensions' autoload :Helpers, 'phrase/helpers' require 'phrase/engine' require 'phrase/backend' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
phrase-0.0.7 | lib/phrase.rb |