Class: AbsenteeCamper::Campfire::Room
- Inherits:
-
Object
- Object
- AbsenteeCamper::Campfire::Room
- Defined in:
- lib/absentee_camper/campfire/room.rb
Instance Attribute Summary collapse
-
#room_id ⇒ Object
readonly
Returns the value of attribute room_id.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(room_id) ⇒ Room
constructor
A new instance of Room.
- #message(message) ⇒ Object
- #paste(paste) ⇒ Object
- #play_sound(sound) ⇒ Object
- #transcript ⇒ Object
Constructor Details
#initialize(room_id) ⇒ Room
Returns a new instance of Room.
6 7 8 |
# File 'lib/absentee_camper/campfire/room.rb', line 6 def initialize(room_id) @room_id = room_id end |
Instance Attribute Details
#room_id ⇒ Object (readonly)
Returns the value of attribute room_id.
4 5 6 |
# File 'lib/absentee_camper/campfire/room.rb', line 4 def room_id @room_id end |
Instance Method Details
#info ⇒ Object
32 33 34 |
# File 'lib/absentee_camper/campfire/room.rb', line 32 def info API.get "/room/#{room_id}.json" end |
#message(message) ⇒ Object
16 17 18 |
# File 'lib/absentee_camper/campfire/room.rb', line 16 def () end |
#paste(paste) ⇒ Object
20 21 22 |
# File 'lib/absentee_camper/campfire/room.rb', line 20 def paste(paste) paste, 'PasteMessage' end |
#play_sound(sound) ⇒ Object
24 25 26 |
# File 'lib/absentee_camper/campfire/room.rb', line 24 def play_sound(sound) sound, 'SoundMessage' end |
#transcript ⇒ Object
28 29 30 |
# File 'lib/absentee_camper/campfire/room.rb', line 28 def transcript get('transcript')['messages'] end |