Class: Ki::Middleware::PublicFileServer

Inherits:
Object
  • Object
show all
Includes:
BaseMiddleware
Defined in:
lib/ki/middleware/public_file_server.rb

Instance Method Summary collapse

Methods included from BaseMiddleware

#initialize

Instance Method Details

#call(env) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/ki/middleware/public_file_server.rb', line 6

def call(env)
  req = BaseRequest.new env
  if public_file_exists? req
    Rack::File.new(Ki::PUBLIC_PATH).call env
  else
    @app.call env
  end
end