Class: Diddy::RunResultMailer
- Inherits:
-
Object
- Object
- Diddy::RunResultMailer
- Defined in:
- lib/diddy/run_result_mailer.rb
Instance Attribute Summary collapse
-
#run_result ⇒ Object
Returns the value of attribute run_result.
Instance Method Summary collapse
-
#initialize(run_result) ⇒ RunResultMailer
constructor
A new instance of RunResultMailer.
- #mail(subject, from, to) ⇒ Object
Constructor Details
#initialize(run_result) ⇒ RunResultMailer
Returns a new instance of RunResultMailer.
5 6 7 |
# File 'lib/diddy/run_result_mailer.rb', line 5 def initialize(run_result) self.run_result = run_result end |
Instance Attribute Details
#run_result ⇒ Object
Returns the value of attribute run_result.
3 4 5 |
# File 'lib/diddy/run_result_mailer.rb', line 3 def run_result @run_result end |
Instance Method Details
#mail(subject, from, to) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/diddy/run_result_mailer.rb', line 12 def mail(subject, from, to) mail_text = RunResultPrinter.new(run_result).to_html Mail.deliver do to to from from subject subject html_part do content_type 'text/html; charset=UTF-8' body mail_text end end end |