Class: Rack::Pubcookie::Fake

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/pubcookie/fake.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, username) ⇒ Fake

Returns a new instance of Fake.



5
6
7
# File 'lib/rack/pubcookie/fake.rb', line 5

def initialize app, username
  @app, @username = app, username
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
# File 'lib/rack/pubcookie/fake.rb', line 9

def call env
  env['REMOTE_USER'] = @username
  @app.call env
end