Sha256: a144ac12ed533ed8c12eec82f1ac0b0d467cba7d8aff1a71e0148ecd9e92b410
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
module RubyApp require 'ruby_app/configuration' require 'ruby_app/log' require 'ruby_app/mixins/configure_mixin' require 'ruby_app/mixins/delegate_mixin' require 'ruby_app/mixins/hash_mixin' require 'ruby_app/session' require 'ruby_app/version' class Application extend RubyApp::Mixins::DelegateMixin include RubyApp::Mixins::ConfigureMixin attr_reader :options, :environment def initialize(options) @options = options @environment = {} end def self.get @@_application ||= nil end def self.create!(options = {}) _options = { :application_class => RubyApp::Application, :session_class => RubyApp::Session, :log_path => File.join(RubyApp::ROOT, %w[log application.log]), :configuration_paths => [], :default_language => :en, :translations_paths => [] }.merge(options) _options.configuration_paths = [File.join(RubyApp::ROOT, %w[config.yml])] + ( _options.configuration_paths.is_a?(Array) ? _options.configuration_paths : [_options.configuration_paths] ) _options.translations_paths = [File.join(RubyApp::ROOT, %w[translations])] + ( _options.translations_paths.is_a?(Array) ? _options.translations_paths : [_options.translations_paths] ) @@_application = _options.application_class.new(_options) RubyApp::Log.open! RubyApp::Configuration.load! end def self.destroy! RubyApp::Configuration.unload! RubyApp::Log.close! @@_application = nil end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
RubyApp-0.0.9 | lib/ruby_app/application.rb |