Class: Dragonfly::CookieMonster

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ CookieMonster

Returns a new instance of CookieMonster.



4
5
6
# File 'lib/dragonfly/cookie_monster.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
# File 'lib/dragonfly/cookie_monster.rb', line 8

def call(env)
  status, headers, body = @app.call(env)
  headers.delete('Set-Cookie') if env['dragonfly.job']
  [status, headers, body]
end