Class: Zm::Client::Message::Recipient

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_nameObject



53
54
55
# File 'lib/zm/client/message/message_recipients.rb', line 53

def display_name
  @display_name || "#{@email} (#{@display_name})"
end

#emailObject

Returns the value of attribute email.



44
45
46
# File 'lib/zm/client/message/message_recipients.rb', line 44

def email
  @email
end

#fieldObject

Returns the value of attribute field.



44
45
46
# File 'lib/zm/client/message/message_recipients.rb', line 44

def field
  @field
end