Class: FreezingEmail::Mail
- Inherits:
-
Object
- Object
- FreezingEmail::Mail
- Defined in:
- lib/freezing_email/mail.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#delivery_handler ⇒ Object
readonly
Returns the value of attribute delivery_handler.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#generated_in ⇒ Object
readonly
Returns the value of attribute generated_in.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(mail, params) ⇒ Mail
constructor
A new instance of Mail.
- #name ⇒ Object
Constructor Details
#initialize(mail, params) ⇒ Mail
Returns a new instance of Mail.
4 5 6 7 8 9 10 11 |
# File 'lib/freezing_email/mail.rb', line 4 def initialize(mail, params) @subject = mail.subject @body = mail.body @to = mail.to @from = mail.from @delivery_handler = mail.delivery_handler.to_s @generated_in = params[:generated_in] if params.has_key?(:generated_in) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
2 3 4 |
# File 'lib/freezing_email/mail.rb', line 2 def body @body end |
#delivery_handler ⇒ Object (readonly)
Returns the value of attribute delivery_handler.
2 3 4 |
# File 'lib/freezing_email/mail.rb', line 2 def delivery_handler @delivery_handler end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
2 3 4 |
# File 'lib/freezing_email/mail.rb', line 2 def from @from end |
#generated_in ⇒ Object (readonly)
Returns the value of attribute generated_in.
2 3 4 |
# File 'lib/freezing_email/mail.rb', line 2 def generated_in @generated_in end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
2 3 4 |
# File 'lib/freezing_email/mail.rb', line 2 def subject @subject end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
2 3 4 |
# File 'lib/freezing_email/mail.rb', line 2 def to @to end |
Instance Method Details
#name ⇒ Object
13 14 15 |
# File 'lib/freezing_email/mail.rb', line 13 def name @name ||= "#{@subject.parameterize.tableize}" end |