Class: BigbluebuttonAttendee

Inherits:
Object
  • Object
show all
Defined in:
lib/classes/bigbluebutton_attendee.rb

Overview

Used to store the attendees of a meeting as returned by BigBlueButton in get_meeting_info.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#full_nameObject

Returns the value of attribute full_name.



5
6
7
# File 'lib/classes/bigbluebutton_attendee.rb', line 5

def full_name
  @full_name
end

#roleObject

Returns the value of attribute role.



5
6
7
# File 'lib/classes/bigbluebutton_attendee.rb', line 5

def role
  @role
end

#user_idObject

Returns the value of attribute user_id.



5
6
7
# File 'lib/classes/bigbluebutton_attendee.rb', line 5

def user_id
  @user_id
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/classes/bigbluebutton_attendee.rb', line 13

def ==(other)
  r = true
  [:user_id, :full_name, :role].each do |param|
    r = r && self.send(param) == other.send(param)
  end
  r
end

#from_hash(hash) ⇒ Object



7
8
9
10
11
# File 'lib/classes/bigbluebutton_attendee.rb', line 7

def from_hash(hash)
  self.user_id = hash[:userID].to_s
  self.full_name = hash[:fullName].to_s
  self.role = hash[:role].to_s.downcase == "moderator" ? :moderator : :attendee
end