Module: Roda::RodaPlugins::ErrorMail::InstanceMethods

Defined in:
lib/roda/plugins/error_mail.rb

Instance Method Summary collapse

Instance Method Details

#error_mail(exception) ⇒ Object

Send an email for the given error. exception is usually an exception instance, but it can be a plain string which is used as the subject for the email.



54
55
56
# File 'lib/roda/plugins/error_mail.rb', line 54

def error_mail(exception)
  _error_mail(exception).deliver!
end

#error_mail_content(exception) ⇒ Object

The content of the email to send, include the headers and the body. Takes the same argument as #error_mail.



60
61
62
# File 'lib/roda/plugins/error_mail.rb', line 60

def error_mail_content(exception)
  _error_mail(exception).to_s
end