Class: AbsenteeCamper::EmailNotifier
- Inherits:
-
Object
- Object
- AbsenteeCamper::EmailNotifier
- Includes:
- Logger
- Defined in:
- lib/absentee_camper/email_notifier.rb
Instance Method Summary collapse
-
#initialize(user_id) ⇒ EmailNotifier
constructor
A new instance of EmailNotifier.
- #notify(message) ⇒ Object
Methods included from Logger
Constructor Details
#initialize(user_id) ⇒ EmailNotifier
Returns a new instance of EmailNotifier.
5 6 7 |
# File 'lib/absentee_camper/email_notifier.rb', line 5 def initialize(user_id) @email_address = user_info(user_id)['email_address'] end |
Instance Method Details
#notify(message) ⇒ Object
9 10 11 12 |
# File 'lib/absentee_camper/email_notifier.rb', line 9 def notify() log "sending email to #{@email_address}" Pony.mail :to => @email_address, :body => email_body() end |