Class: Zm::Client::Message::Recipient
- Inherits:
-
Object
- Object
- Zm::Client::Message::Recipient
- Defined in:
- lib/zm/client/message/message_recipients.rb
Overview
Class one recipient for email
Constant Summary collapse
- FROM =
:f
- TO =
:t
- CC =
:c
- BCC =
:b
Instance Attribute Summary collapse
- #display_name ⇒ Object
-
#email ⇒ Object
Returns the value of attribute email.
-
#field ⇒ Object
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field, email, display_name = nil) ⇒ Recipient
constructor
A new instance of Recipient.
Constructor Details
#initialize(field, email, display_name = nil) ⇒ Recipient
Returns a new instance of Recipient.
47 48 49 50 51 |
# File 'lib/zm/client/message/message_recipients.rb', line 47 def initialize(field, email, display_name = nil) @email = email @field = field.to_sym @display_name = display_name end |
Instance Attribute Details
#display_name ⇒ Object
53 54 55 |
# File 'lib/zm/client/message/message_recipients.rb', line 53 def display_name @display_name || "#{@email} (#{@display_name})" end |
#email ⇒ Object
Returns the value of attribute email.
44 45 46 |
# File 'lib/zm/client/message/message_recipients.rb', line 44 def email @email end |
#field ⇒ Object
Returns the value of attribute field.
44 45 46 |
# File 'lib/zm/client/message/message_recipients.rb', line 44 def field @field end |