Class: Axeman::Display

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Display

Returns a new instance of Display.



3
4
5
# File 'lib/axeman/display.rb', line 3

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/axeman/display.rb', line 7

def call(env)
  if env['REQUEST_PATH'] =~ /axeman/
    [200, {}, Array(Axeman.subscriber.total.inspect)]
  else
    @app.call(env)
  end
end