Class: SleepRoom::Record::API::Room

Inherits:
Object
  • Object
show all
Defined in:
lib/sleeproom/record/api/room.rb

Instance Method Summary collapse

Constructor Details

#initialize(room_name) ⇒ Room

Returns a new instance of Room.



7
8
9
# File 'lib/sleeproom/record/api/room.rb', line 7

def initialize(room_name)
  @url = ROOM_URL + "/" + room_name
end

Instance Method Details

#get(task: Async::Task.current) ⇒ Object



11
12
13
# File 'lib/sleeproom/record/api/room.rb', line 11

def get(task: Async::Task.current)
  @json = API.get(@url).wait
end