Class: Mailtruck::Email
- Inherits:
-
Object
- Object
- Mailtruck::Email
- Defined in:
- lib/mailtruck/email.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(attributes) ⇒ Email
constructor
A new instance of Email.
Constructor Details
#initialize(attributes) ⇒ Email
Returns a new instance of Email.
4 5 6 7 8 |
# File 'lib/mailtruck/email.rb', line 4 def initialize(attributes) [:to, :from, :subject, :html].each do |key| instance_variable_set "@#{key}", attributes[key.to_s] end end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
2 3 4 |
# File 'lib/mailtruck/email.rb', line 2 def from @from end |
#subject ⇒ Object
Returns the value of attribute subject.
2 3 4 |
# File 'lib/mailtruck/email.rb', line 2 def subject @subject end |
#to ⇒ Object
Returns the value of attribute to.
2 3 4 |
# File 'lib/mailtruck/email.rb', line 2 def to @to end |
Instance Method Details
#body ⇒ Object
10 11 12 |
# File 'lib/mailtruck/email.rb', line 10 def body @html end |