Class: Lilypad::Hoptoad::Notify
- Inherits:
-
Object
- Object
- Lilypad::Hoptoad::Notify
- Includes:
- Log::Methods
- Defined in:
- lib/lilypad/hoptoad/notify.rb
Defined Under Namespace
Classes: Backtrace
Instance Method Summary collapse
-
#initialize(env, exception) ⇒ Notify
constructor
A new instance of Notify.
Methods included from Log::Methods
Constructor Details
#initialize(env, exception) ⇒ Notify
Returns a new instance of Notify.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lilypad/hoptoad/notify.rb', line 7 def initialize(env, exception) @exception = exception @env = env http_start do |http| begin xml = XML.build *parse http.post @uri.path, xml, headers rescue Exception => e end end if env && success? env['hoptoad.notified'] = true end Config::Request.reset! log :notify, @response success? end |