Class: God::Contact

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

### Methods

friendly_name generate normalize notify valid?

### Included Modules

Configurable

### Attributes

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

### Public Class methods

generate(kind)
normalize(spec)

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)

valid?(contact)

### Public Instance methods

friendly_name()

Construct the friendly name of this Contact, looks like:

Contact FooBar

notify(message, time, priority, category, host)

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]