module Notifier

The notifier gem offers a simple framework for type-based notification events.

Working much like ActionMailer, this base class simply adds a method_missing implementation to child classes that allows delegation of calls to ‘notify!(object_or_class, params…)’ to a method in the child class named after the class type of the first parameter.

Concrete sub-classes should implement a method named after the class type of the document being notified on - with the convention that the method name is all downcase with ‘::’ replaced with ‘_’.

For an example, see Notifier::Error in the /example directory and the corresponding unit test /test/test_error_notifier.rb.