Class: Maildis::Sender
- Inherits:
-
Object
- Object
- Maildis::Sender
- Defined in:
- lib/maildis/sender.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, email) ⇒ Sender
constructor
A new instance of Sender.
- #to_email ⇒ Object
Constructor Details
#initialize(name, email) ⇒ Sender
Returns a new instance of Sender.
6 7 8 9 |
# File 'lib/maildis/sender.rb', line 6 def initialize(name, email) @name = name @email = email end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/maildis/sender.rb', line 4 def email @email end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/maildis/sender.rb', line 4 def name @name end |
Instance Method Details
#to_email ⇒ Object
11 12 13 14 |
# File 'lib/maildis/sender.rb', line 11 def to_email return "#{@name} <#{@email}>" if @name @email end |