class Kaffe::Static
Public Class Methods
new(app=nil, path)
click to toggle source
# File lib/kaffe/static.rb, line 3 def initialize(app=nil, path) @app = app @files = Rack::File.new(path) end
Public Instance Methods
call(env)
click to toggle source
# File lib/kaffe/static.rb, line 8 def call(env) res = @files.call(env) if res.first == 404 && @app res =@app.call(env) end res end