Sha256: e885d7f0ac78d8ed3a5e461bdad3831ef99dd7c71bb00922d43757301ab2c985
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
require "lit/engine" require 'lit/loader' module Lit mattr_accessor :authentication_function mattr_accessor :key_value_engine mattr_accessor :storage_options mattr_accessor :humanize_key mattr_accessor :fallback mattr_accessor :api_enabled mattr_accessor :api_key class << self attr_accessor :loader end def self.init @@table_exists ||= Lit::Locale.table_exists? if self.loader.nil? && @@table_exists self.loader ||= Loader.new Lit.humanize_key = true if Lit.humanize_key.nil? #if loading all translations on start, migrations have to be performed #already, fails on first deploy #self.loader.cache.load_all_translations Lit.storage_options ||= {} end self.loader end def self.get_key_value_engine case Lit.key_value_engine when 'redis' require 'lit/adapters/redis_storage' return RedisStorage.new else require 'lit/adapters/hash_storage' return HashStorage.new end end end if defined? Rails require 'lit/rails' end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lit-0.2.1 | lib/lit.rb |
lit-0.2.0 | lib/lit.rb |
lit-0.1.0 | lib/lit.rb |