Class: Mail::GrowlMailer
- Inherits:
-
Object
- Object
- Mail::GrowlMailer
- Defined in:
- lib/growl_mailer.rb
Overview
The GrowlMailer is a bare bones mailer that does nothing but use Growl Notify to alert to the fact a messages delivery attempt has happend
Instance Attribute Summary collapse
-
#settings ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(values) ⇒ GrowlMailer
constructor
A new instance of GrowlMailer.
Constructor Details
#initialize(values) ⇒ GrowlMailer
Returns a new instance of GrowlMailer.
9 10 11 12 13 14 15 16 |
# File 'lib/growl_mailer.rb', line 9 def initialize(values) puts values.inspect self.settings = { :icon => 'Mail', :message => lambda { |mail| mail.subject }, :title => lambda { |mail| mail.destinations.join(", ") } }.merge!(values) end |
Instance Attribute Details
#settings ⇒ Object
Returns the value of attribute settings.
7 8 9 |
# File 'lib/growl_mailer.rb', line 7 def settings @settings end |
Instance Method Details
#deliver!(mail) ⇒ Object
18 19 20 21 |
# File 'lib/growl_mailer.rb', line 18 def deliver!(mail) = (mail) Growl.notify .delete(:message), end |