Class: Rack::Pratchett

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

Constant Summary collapse

VERSION =
"0.1.1"

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Pratchett

Returns a new instance of Pratchett.



3
4
5
# File 'lib/rack/pratchett.rb', line 3

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
# File 'lib/rack/pratchett.rb', line 7

def call(env)
  result = @app.call(env)
  result[1]['X-Clacks-Overhead'.freeze] = 'GNU Terry Pratchett'.freeze
  result
end