Class: PeepingTom::Notifier::Email
- Inherits:
-
Object
- Object
- PeepingTom::Notifier::Email
- Defined in:
- lib/peeping_tom/notifier/email.rb
Instance Attribute Summary collapse
-
#emails ⇒ Object
readonly
Returns the value of attribute emails.
Instance Method Summary collapse
-
#initialize(*sendmail_and_emails) ⇒ Email
constructor
A new instance of Email.
- #notify!(site) ⇒ Object
Constructor Details
#initialize(*sendmail_and_emails) ⇒ Email
Returns a new instance of Email.
8 9 10 11 |
# File 'lib/peeping_tom/notifier/email.rb', line 8 def initialize(*sendmail_and_emails) @sendmail_path = sendmail_and_emails.shift @emails = sendmail_and_emails end |
Instance Attribute Details
#emails ⇒ Object (readonly)
Returns the value of attribute emails.
6 7 8 |
# File 'lib/peeping_tom/notifier/email.rb', line 6 def emails @emails end |
Instance Method Details
#notify!(site) ⇒ Object
13 14 15 16 17 |
# File 'lib/peeping_tom/notifier/email.rb', line 13 def notify!(site) self.emails.each do |email| send_email(email, "#{site.name} is down", "#{site.name} was tested at #{site.url}, and it's busted. You should look into that.") end end |