Class: CampfireBot::AbsenteeCamper::Notification::EmailNotifier
- Inherits:
-
Object
- Object
- CampfireBot::AbsenteeCamper::Notification::EmailNotifier
- Defined in:
- lib/campfire_bot/absentee_camper/notification/email_notifier.rb
Instance Method Summary collapse
-
#initialize(room, user_id) ⇒ EmailNotifier
constructor
A new instance of EmailNotifier.
- #notify(message) ⇒ Object
Methods included from Helpers
Methods included from Config
Constructor Details
#initialize(room, user_id) ⇒ EmailNotifier
Returns a new instance of EmailNotifier.
10 11 12 13 |
# File 'lib/campfire_bot/absentee_camper/notification/email_notifier.rb', line 10 def initialize(room, user_id) @email_address = room.user(user_id)['email_address'] @room = room end |
Instance Method Details
#notify(message) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/campfire_bot/absentee_camper/notification/email_notifier.rb', line 15 def notify() Logger.instance.debug "sending email to #{@email_address}" Pony.mail({ :to => @email_address, :body => email_body() }.merge()) end |