Class: I::Rack

Inherits:
Object
  • Object
show all
Defined in:
lib/i-rack/i.rb,
lib/i-rack/version.rb

Constant Summary collapse

VERSION =
"0.1.0".freeze

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Rack

Returns a new instance of Rack.



7
8
9
# File 'lib/i-rack/i.rb', line 7

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/i-rack/i.rb', line 11

def call(env)
  if env["PATH_INFO"] == "/WMD"
    ["404 Not Found", {"Content-Type" => "text/plain", "Content-Length" => "0"}, []]
  else
    @app.call(env)
  end
end