Class: Zm::Client::Appointment::Attendees

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/appointment/appointment.rb

Overview

Collection attendees

Instance Method Summary collapse

Constructor Details

#initializeAttendees

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

#clearObject



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