# File lib/exception_notifier/campfire_notifier.rb, line 8 def initialize(options) begin subdomain = options.delete(:subdomain) room_name = options.delete(:room_name) @campfire = Tinder::Campfire.new subdomain, options @room = @campfire.find_room_by_name room_name rescue @campfire = @room = nil end end
# File lib/exception_notifier/campfire_notifier.rb, line 19 def call(exception, options={}) @room.paste "A new exception occurred: '#{exception.message}' on '#{exception.backtrace.first}'" if active? end
# File lib/exception_notifier/campfire_notifier.rb, line 25 def active? !@room.nil? end