Class: Rack::StaticaServer

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/statica_server.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ StaticaServer

Returns a new instance of StaticaServer.



6
7
8
# File 'lib/rack/statica_server.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

#_call(env) ⇒ Object



14
15
16
17
18
# File 'lib/rack/statica_server.rb', line 14

def _call(env)
  env['PATH_INFO'] = Statica.resolve(env['PATH_INFO'])

  @app.call(env)
end

#call(env) ⇒ Object



10
11
12
# File 'lib/rack/statica_server.rb', line 10

def call(env)
  dup._call(env)
end