Class: ESI::Dispatcher

Inherits:
Mongrel::HttpHandler
  • Object
show all
Defined in:
lib/esi/dispatcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Dispatcher

Returns a new instance of Dispatcher.



10
11
12
13
14
15
16
# File 'lib/esi/dispatcher.rb', line 10

def initialize( options )
  super()
  @config = ESI::Config.new( options )
  if @config.start_invalidator?
    ESI::Invalidator.start( self )
  end
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/esi/dispatcher.rb', line 6

def config
  @config
end

#routerObject (readonly)

Returns the value of attribute router.



6
7
8
# File 'lib/esi/dispatcher.rb', line 6

def router
  @router
end

Instance Method Details

#process(request, response) ⇒ Object



18
19
20
# File 'lib/esi/dispatcher.rb', line 18

def process(request, response)
  ESI::Proxy.new(@config).process(request,response)
end