Class: Ziltoid::EmailNotifier
- Inherits:
-
Object
- Object
- Ziltoid::EmailNotifier
- Defined in:
- lib/ziltoid/email_notifier.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#to ⇒ Object
Returns the value of attribute to.
-
#via_options ⇒ Object
Returns the value of attribute via_options.
Instance Method Summary collapse
-
#initialize(options) ⇒ EmailNotifier
constructor
A new instance of EmailNotifier.
- #send(message) ⇒ Object
Constructor Details
#initialize(options) ⇒ EmailNotifier
Returns a new instance of EmailNotifier.
7 8 9 10 11 12 |
# File 'lib/ziltoid/email_notifier.rb', line 7 def initialize() self. = [:via_options] self.to = [:to] self.from = [:from] self.subject = [:subject] end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/ziltoid/email_notifier.rb', line 5 def from @from end |
#subject ⇒ Object
Returns the value of attribute subject.
5 6 7 |
# File 'lib/ziltoid/email_notifier.rb', line 5 def subject @subject end |
#to ⇒ Object
Returns the value of attribute to.
5 6 7 |
# File 'lib/ziltoid/email_notifier.rb', line 5 def to @to end |
#via_options ⇒ Object
Returns the value of attribute via_options.
5 6 7 |
# File 'lib/ziltoid/email_notifier.rb', line 5 def @via_options end |
Instance Method Details
#send(message) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/ziltoid/email_notifier.rb', line 14 def send() Pony.mail( :to => self.to, :via => :smtp, :via_options => self., :from => self.from, :subject => self.subject, :body => ) end |