# File lib/god/contacts/campfire.rb, line 102 def notify(message, time, priority, category, host) body = Campfire.format.call(message, time, priority, category, host) conn = Marshmallow::Connection.new( :subdomain => arg(:subdomain), :token => arg(:token), :ssl => arg(:ssl) ) conn.speak(arg(:room), body) self.info = "notified campfire: #{arg(:subdomain)}" rescue Object => e applog(nil, :info, "failed to notify campfire: #{e.message}") applog(nil, :debug, e.backtrace.join("\n")) end
# File lib/god/contacts/campfire.rb, line 94 def valid? valid = true valid &= complain("Attribute 'subdomain' must be specified", self) unless arg(:subdomain) valid &= complain("Attribute 'token' must be specified", self) unless arg(:token) valid &= complain("Attribute 'room' must be specified", self) unless arg(:room) valid end
Generated with the Darkfish Rdoc Generator 2.