Class: Licode::Room
- Inherits:
-
Object
- Object
- Licode::Room
- 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
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#room_id ⇒ Object
readonly
Returns the value of attribute room_id.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
- #create_token(username, role) ⇒ Object
-
#initialize(room_id, opts = {}) ⇒ Room
constructor
A new instance of Room.
- #to_s ⇒ Object
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
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
8 9 10 |
# File 'lib/licode/room.rb', line 8 def opts @opts end |
#room_id ⇒ Object (readonly)
Returns the value of attribute room_id.
8 9 10 |
# File 'lib/licode/room.rb', line 8 def room_id @room_id end |
#users ⇒ Object (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_s ⇒ Object
25 26 27 |
# File 'lib/licode/room.rb', line 25 def to_s @room_id end |