Class: PowerByAutobots

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ PowerByAutobots

Returns a new instance of PowerByAutobots.



2
3
4
# File 'lib/power_by_autobots.rb', line 2

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



6
7
8
9
10
11
# File 'lib/power_by_autobots.rb', line 6

def call(env)
  status, headers, response = @app.call(env)
  headers["X-Powered-By"] = "Autobots"

  [status, headers, response]
end