module Quiver::Application
Attributes
router[RW]
Public Class Methods
included(host)
click to toggle source
# File lib/quiver/application.rb, line 3 def self.included(host) host.send(:extend, ClassMethods) host.root_module = host.parent host.root_module.const_set(:Adapters, Module.new) host.root_module.const_set(:Duties, Module.new) host.root_module.const_set(:Endpoints, Module.new) host.root_module.const_set(:Models, Module.new) host.root_module.const_set(:Mappers, Quiver::Mappers.dup) host.root_module.const_set(:Serializers, Module.new) host.root_module.const_set(:Tasks, Quiver::Tasks.dup) host.root_module.const_set(:Logger, Quiver::Logger.dup) host.root_module.const_set(:DutyMaster, Quiver::DutyMaster.dup) host.root_module.const_set(:DutyTestHelper, Quiver::DutyTestHelper.dup) host.memory_adapter_store = Quiver::Adapter::MemoryAdapterStore.new application_file = caller[0].partition(':').first host.app_root = File.expand_path('..', File.dirname(application_file)) host.lib_dir = File.join(host.app_root, 'lib', File.basename(application_file, '.rb')) host.default_adapter_type = :memory host.default_duty_queue_backend = :memory end
new()
click to toggle source
# File lib/quiver/application.rb, line 116 def initialize self.router = self.class.root_module::Config::Router.new end
Public Instance Methods
call(env)
click to toggle source
# File lib/quiver/application.rb, line 120 def call(env) self.class.middleware_stack.stack(router).call(env) end