Class: AbsenteeCamper::EmailNotifier

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/absentee_camper/email_notifier.rb

Instance Method Summary collapse

Methods included from Logger

#log

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_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(message)
  log "sending email to #{@email_address}"
  Pony.mail :to => @email_address, :body => email_body(message)
end