Class: Zm::Client::Appointment::Attendees
- Inherits:
-
Object
- Object
- Zm::Client::Appointment::Attendees
- Defined in:
- lib/zm/client/appointment/appointment.rb
Overview
Collection attendees
Instance Method Summary collapse
- #add(attendee) ⇒ Object
- #clear ⇒ Object
- #del(attendee) ⇒ Object
-
#initialize ⇒ Attendees
constructor
A new instance of Attendees.
- #map(&block) ⇒ Object
Constructor Details
#initialize ⇒ Attendees
Returns a new instance of Attendees.
106 107 108 |
# File 'lib/zm/client/appointment/appointment.rb', line 106 def initialize @attendees = [] end |
Instance Method Details
#add(attendee) ⇒ Object
114 115 116 117 118 |
# File 'lib/zm/client/appointment/appointment.rb', line 114 def add(attendee) return unless attendee.is_a?(Attendee) @attendees.push(attendee) end |
#clear ⇒ Object
129 130 131 |
# File 'lib/zm/client/appointment/appointment.rb', line 129 def clear @attendees.clear end |
#del(attendee) ⇒ Object
120 121 122 123 124 125 126 127 |
# File 'lib/zm/client/appointment/appointment.rb', line 120 def del(attendee) case attendee when Attendee @attendees.delete(attendee) when String @attendees.delete_if { |at| at.email == attendee } end end |
#map(&block) ⇒ Object
110 111 112 |
# File 'lib/zm/client/appointment/appointment.rb', line 110 def map(&block) @attendees.map(&block) end |