Class: UnfuddleNotifier

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

Constant Summary collapse

TEMPLATE_PATH =
File.dirname(__FILE__) + "/../views"

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ UnfuddleNotifier

Returns a new instance of UnfuddleNotifier.



8
9
10
# File 'lib/unfuddle_notifier.rb', line 8

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
# File 'lib/unfuddle_notifier.rb', line 12

def call(env)
  status, headers, response = @app.call(env)
  [status, headers, ERB.new(File.read("views/ui/panel.html.erb")).result + response.body]
end