Class: God::Contacts::Campfire
- Inherits:
-
God::Contact
- Object
- God::Contact
- God::Contacts::Campfire
- Defined in:
- lib/god/contacts/campfire.rb
Class Attribute Summary collapse
-
.format ⇒ Object
Returns the value of attribute format.
-
.server_settings ⇒ Object
Returns the value of attribute server_settings.
Attributes inherited from God::Contact
Instance Method Summary collapse
-
#initialize ⇒ Campfire
constructor
A new instance of Campfire.
- #notify(message, time, priority, category, host) ⇒ Object
Methods inherited from God::Contact
#friendly_name, generate, normalize, valid?
Methods included from God::Configurable
#base_name, #complain, complain, #friendly_name, #prepare, #reset, #valid?
Constructor Details
#initialize ⇒ Campfire
Returns a new instance of Campfire.
50 51 52 |
# File 'lib/god/contacts/campfire.rb', line 50 def initialize @room = nil end |
Class Attribute Details
.format ⇒ Object
Returns the value of attribute format.
36 37 38 |
# File 'lib/god/contacts/campfire.rb', line 36 def format @format end |
.server_settings ⇒ Object
Returns the value of attribute server_settings.
36 37 38 |
# File 'lib/god/contacts/campfire.rb', line 36 def server_settings @server_settings end |
Instance Method Details
#notify(message, time, priority, category, host) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/god/contacts/campfire.rb', line 54 def notify(, time, priority, category, host) begin body = Campfire.format.call(,host) room.speak body self.info = "notified campfire: #{Campfire.server_settings[:subdomain]}" rescue => e applog(nil, :info, "failed to notify campfire: #{e.}") applog(nil, :debug, e.backtrace.join("\n")) end end |