module CableBroadcastable
  extend ActiveSupport::Concern

  class_methods do
    def broadcast_message(session, data)
      broadcast_to(session, method: "receive_message", data: data)
    end
  end
end
