Class: HerokuMongoWatcher::Mailer
- Inherits:
-
Object
- Object
- HerokuMongoWatcher::Mailer
- Includes:
- Singleton
- Defined in:
- lib/heroku_mongo_watcher/mailer.rb
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
20 21 22 |
# File 'lib/heroku_mongo_watcher/mailer.rb', line 20 def config HerokuMongoWatcher::Configuration.instance.config end |
#notify(data_row, msg) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/heroku_mongo_watcher/mailer.rb', line 24 def notify(data_row,msg) Thread.new('notify_admins') do subscribers = config[:notify] || [] subscribers.each { |user_email| send_email(user_email, msg, data_row) } end end |