Class: Mack::Runner

Inherits:
Object show all
Defined in:
lib/mack/runner.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object

:nodoc:



6
7
8
# File 'lib/mack/runner.rb', line 6

def call(env) # :nodoc:
  Mack::Application.new.call(env)
end

#deferred?(env) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


10
11
12
13
14
15
16
17
18
19
# File 'lib/mack/runner.rb', line 10

def deferred?(env) # :nodoc:
  if configatron.mack.use_deferred_routes
    method = env["REQUEST_METHOD"].downcase.to_sym
    routes = Mack::Routes.deferred_routes_list[method]
    routes.each do |route|
      return true if route.match?(:uri => env['PATH_INFO'], :host => env['SERVER_NAME'], :port => env['SERVER_PORT'], :scheme => env['rack.url_scheme'])
    end
  end
  return false
end