Class: Zm::Client::Message::Recipient
- Inherits:
-
Object
- Object
- Zm::Client::Message::Recipient
- Defined in:
- lib/zm/client/message/message.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
Returns the value of attribute display_name.
-
#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.
- #to_jsns ⇒ Object
Constructor Details
#initialize(field, email, display_name = nil) ⇒ Recipient
Returns a new instance of Recipient.
209 210 211 212 213 |
# File 'lib/zm/client/message/message.rb', line 209 def initialize(field, email, display_name = nil) @email = email @field = field.to_sym @display_name = display_name end |
Instance Attribute Details
#display_name ⇒ Object
Returns the value of attribute display_name.
207 208 209 |
# File 'lib/zm/client/message/message.rb', line 207 def display_name @display_name end |
#email ⇒ Object
Returns the value of attribute email.
207 208 209 |
# File 'lib/zm/client/message/message.rb', line 207 def email @email end |
#field ⇒ Object
Returns the value of attribute field.
207 208 209 |
# File 'lib/zm/client/message/message.rb', line 207 def field @field end |
Instance Method Details
#to_jsns ⇒ Object
215 216 217 218 219 220 221 |
# File 'lib/zm/client/message/message.rb', line 215 def to_jsns { t: @field, a: @email, p: @display_name }.reject { |_, v| v.nil? } end |