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 ⇒ Object
Constructor Details
#initialize ⇒ Attendees
Returns a new instance of Attendees.
109 110 111 |
# File 'lib/zm/client/appointment/appointment.rb', line 109 def initialize @attendees = [] end |
Instance Method Details
#add(attendee) ⇒ Object
117 118 119 120 121 |
# File 'lib/zm/client/appointment/appointment.rb', line 117 def add(attendee) return unless attendee.is_a?(Attendee) @attendees.push(attendee) end |
#clear ⇒ Object
132 133 134 |
# File 'lib/zm/client/appointment/appointment.rb', line 132 def clear @attendees.clear end |
#del(attendee) ⇒ Object
123 124 125 126 127 128 129 130 |
# File 'lib/zm/client/appointment/appointment.rb', line 123 def del(attendee) case attendee when Attendee @attendees.delete(attendee) when String @attendees.delete_if { |at| at.email == attendee } end end |
#map ⇒ Object
113 114 115 |
# File 'lib/zm/client/appointment/appointment.rb', line 113 def map(&) @attendees.map(&) end |