Class: Rusen::Notifiers::EmailNotifier
- Inherits:
-
Object
- Object
- Rusen::Notifiers::EmailNotifier
- Defined in:
- lib/rusen/notifiers/email_notifier.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(settings) ⇒ EmailNotifier
constructor
A new instance of EmailNotifier.
- #notify(notification) ⇒ Object
Constructor Details
#initialize(settings) ⇒ EmailNotifier
Returns a new instance of EmailNotifier.
13 14 15 |
# File 'lib/rusen/notifiers/email_notifier.rb', line 13 def initialize(settings) @settings = settings end |
Class Method Details
.identification_symbol ⇒ Object
9 10 11 |
# File 'lib/rusen/notifiers/email_notifier.rb', line 9 def self.identification_symbol :email end |
Instance Method Details
#notify(notification) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rusen/notifiers/email_notifier.rb', line 17 def notify(notification) begin @notification = notification Pony.mail(.merge({:body => build_body})) # We need to ignore all the exceptions thrown by EmailNotifier.notify. rescue Exception => e ERROR("Rusen: #{e.} prevented the notification email from being sent.") end end |