Sha256: 4046bb77164ccbbf310c86a987ef1e3282313504626546ea5777f94b55c645b3
Contents?: true
Size: 748 Bytes
Versions: 70
Compression:
Stored size: 748 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'r18n-core' module RubyApp require 'ruby_app/application' require 'ruby_app/mixins/delegate_mixin' require 'ruby_app/request' class Language < R18n::I18n extend RubyApp::Mixins::DelegateMixin def self.get R18n.get end def self.load! R18n.thread_set(RubyApp::Language.new(RubyApp::Request.language, RubyApp::Application.options.translations_paths)) if block_given? begin yield ensure self.unload! end end end def self.unload! R18n.thread_set(nil) end private def initialize(language, translations_paths) super(language, translations_paths) end end end
Version data entries
70 entries across 70 versions & 1 rubygems