method
execute_command
v7.1.3.4 -
Show latest stable
- Class:
ActionCable::Connection::Subscriptions
execute_command(data)public
No documentation available.
# File actioncable/lib/action_cable/connection/subscriptions.rb, line 17
def execute_command(data)
case data["command"]
when "subscribe" then add data
when "unsubscribe" then remove data
when "message" then perform_action data
else
logger.error "Received unrecognized command in #{data.inspect}"
end
rescue Exception => e
@connection.rescue_with_handler(e)
logger.error "Could not execute command from (#{data.inspect}) [#{e.class} - #{e.message}]: #{e.backtrace.first(5).join(" | ")}"
end