Class: Qmin::Reporting::MailBuilder
- Inherits:
-
Object
- Object
- Qmin::Reporting::MailBuilder
- Defined in:
- lib/qmin/reporting/mail/mail_builder.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#mail_from ⇒ Object
readonly
Returns the value of attribute mail_from.
-
#mail_to ⇒ Object
readonly
Returns the value of attribute mail_to.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(exception, mail_to, mail_from) ⇒ MailBuilder
constructor
A new instance of MailBuilder.
Constructor Details
#initialize(exception, mail_to, mail_from) ⇒ MailBuilder
Returns a new instance of MailBuilder.
4 5 6 |
# File 'lib/qmin/reporting/mail/mail_builder.rb', line 4 def initialize(exception, mail_to, mail_from) @exception, @mail_to, @mail_from = exception, mail_to, mail_from end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
8 9 10 |
# File 'lib/qmin/reporting/mail/mail_builder.rb', line 8 def exception @exception end |
#mail_from ⇒ Object (readonly)
Returns the value of attribute mail_from.
8 9 10 |
# File 'lib/qmin/reporting/mail/mail_builder.rb', line 8 def mail_from @mail_from end |
#mail_to ⇒ Object (readonly)
Returns the value of attribute mail_to.
8 9 10 |
# File 'lib/qmin/reporting/mail/mail_builder.rb', line 8 def mail_to @mail_to end |
Instance Method Details
#build ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/qmin/reporting/mail/mail_builder.rb', line 10 def build mail = ::Mail.new mail.to mail_to mail.from mail_from mail.subject subject mail.body clean_backtrace.join("\n") mail end |