Class: Licode::Room

Inherits:
Object
  • Object
show all
Defined in:
lib/licode/room.rb

Overview

Represents an Licode room.

Use the Nuve.create_room() method to create an Licode room. Use the room_id property of the Room object to get the room room_id.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(room_id, opts = {}) ⇒ Room

Returns a new instance of Room.



11
12
13
14
# File 'lib/licode/room.rb', line 11

def initialize(room_id, opts={})
  @room_id = room_id
  @opts = opts
end

Instance Attribute Details

#optsObject (readonly)

Returns the value of attribute opts.



8
9
10
# File 'lib/licode/room.rb', line 8

def opts
  @opts
end

#room_idObject (readonly)

Returns the value of attribute room_id.



8
9
10
# File 'lib/licode/room.rb', line 8

def room_id
  @room_id
end

#usersObject (readonly)

Returns the value of attribute users.



8
9
10
# File 'lib/licode/room.rb', line 8

def users
  @users
end

Instance Method Details

#create_token(username, role) ⇒ Object



16
17
18
# File 'lib/licode/room.rb', line 16

def create_token(username, role)
  client.create_token(room_id, username, role)
end

#to_sObject



25
26
27
# File 'lib/licode/room.rb', line 25

def to_s
  @room_id
end