Class God::Contact
In: lib/god/contact.rb
Parent: Object

Methods

Included Modules

Configurable

Attributes

group  [RW] 
info  [RW] 
name  [RW] 

Public Class methods

Normalize the given notify specification into canonical form.

  +spec+ is the notify spec as a String, Array of Strings, or Hash

Canonical form looks like: {:contacts => [‘fred’, ‘john’], :priority => ‘1’, :category => ‘awesome’} Where :contacts will be present and point to an Array of Strings. Both :priority and :category may not be present but if they are, they will each contain a single String.

Returns normalized notify spec Raises ArgumentError on invalid spec (message contains details)

Public Instance methods

Construct the friendly name of this Contact, looks like:

Contact FooBar

Abstract Send the message to the external source

  +message+ is the message body returned from the condition
  +time+ is the Time at which the notification was made
  +priority+ is the arbitrary priority String
  +category+ is the arbitrary category String
  +host+ is the hostname of the server

[Validate]