Class: BackgroundCache::AppInstance

Inherits:
Object
  • Object
show all
Includes:
ActionController::UrlWriter, ActionDispatch::Routing::UrlFor, Rack::Test::Methods
Defined in:
lib/background_cache.rb

Instance Method Summary collapse

Instance Method Details

#appObject



27
28
29
30
31
32
33
# File 'lib/background_cache.rb', line 27

def app
  if defined?(Rails::Application)
    Rails::Application.subclasses.first
  elsif defined?(ActionController::Dispatcher)
    ActionController::Dispatcher.new
  end
end