Module: CableRoom::RoomProxyChannel
- Extended by:
- ActiveSupport::Concern
- Includes:
- RoomMember
- Defined in:
- lib/cable_room/room_proxy_channel.rb
Instance Method Summary collapse
Methods included from RoomMember
Instance Method Details
#receive(data) ⇒ Object
16 17 18 |
# File 'lib/cable_room/room_proxy_channel.rb', line 16 def receive(data) @room_membership << data if @room_membership&.connected? end |
#subscribed ⇒ Object
12 13 14 |
# File 'lib/cable_room/room_proxy_channel.rb', line 12 def subscribed @room_membership = subscribe_to_room end |
#unsubscribed ⇒ Object
20 21 22 |
# File 'lib/cable_room/room_proxy_channel.rb', line 20 def unsubscribed @room_membership&.leave! end |