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.



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

#clearObject



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

#mapObject



113
114
115
# File 'lib/zm/client/appointment/appointment.rb', line 113

def map(&)
  @attendees.map(&)
end