Module: MyVR::API::Rooms

Included in:
Client
Defined in:
lib/myvr/api/rooms.rb

Instance Method Summary collapse

Instance Method Details

#room(id) ⇒ Object



15
16
17
18
# File 'lib/myvr/api/rooms.rb', line 15

def room(id)
  data = get_object("/v1/rooms/#{ id }/")
  MyVR::Room.new(data)
end

#roomsObject



11
12
13
# File 'lib/myvr/api/rooms.rb', line 11

def rooms
  @rooms ||= rooms!
end

#rooms!Object



4
5
6
7
8
9
# File 'lib/myvr/api/rooms.rb', line 4

def rooms!
  data = get_objects("/v1/rooms/")
  data.map do |room|
    MyVR::Room.new(room)
  end
end