Class: Zm::Client::Message::Recipients
- Inherits:
-
Object
- Object
- Zm::Client::Message::Recipients
- Defined in:
- lib/zm/client/message/message_recipients.rb
Overview
Collection recipients
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
Instance Method Summary collapse
- #add(recipient) ⇒ Object
- #bcc ⇒ Object
- #cc ⇒ Object
- #from ⇒ Object
-
#initialize ⇒ Recipients
constructor
A new instance of Recipients.
- #to ⇒ Object
Constructor Details
#initialize ⇒ Recipients
Returns a new instance of Recipients.
10 11 12 |
# File 'lib/zm/client/message/message_recipients.rb', line 10 def initialize @all = [] end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
8 9 10 |
# File 'lib/zm/client/message/message_recipients.rb', line 8 def all @all end |
Instance Method Details
#add(recipient) ⇒ Object
14 15 16 17 18 |
# File 'lib/zm/client/message/message_recipients.rb', line 14 def add(recipient) return unless recipient.is_a?(Zm::Client::Recipient) @all.push(recipient) end |
#bcc ⇒ Object
28 29 30 |
# File 'lib/zm/client/message/message_recipients.rb', line 28 def bcc @all.select { |r| r.field == Zm::Client::Recipient::BCC } end |
#cc ⇒ Object
24 25 26 |
# File 'lib/zm/client/message/message_recipients.rb', line 24 def cc @all.select { |r| r.field == Zm::Client::Recipient::CC } end |