class CableX::Channel::CableXChannel
CableXChannel
class to serve subscription, and cmd execution
Attributes
controller_action_hash[R]
ctrl[R]
data[R]
request[R]
request_id[R]
response[R]
response_body[R]
Public Instance Methods
cmd(data)
click to toggle source
# File lib/cable_x/channel/cable_x_channel.rb, line 25 def cmd(data) @data = data invoke_controller prepare_response transmit response_body, via: device_id end
subscribed()
click to toggle source
# File lib/cable_x/channel/cable_x_channel.rb, line 18 def subscribed reject unless device_id.present? stream_from device_id end
unsubscribed()
click to toggle source
# File lib/cable_x/channel/cable_x_channel.rb, line 23 def unsubscribed; end