2017-07-16 13:10:15 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-01-15 19:07:18 -05:00
|
|
|
class SuccessAdapter < ActionCable::SubscriptionAdapter::Base
|
2016-01-15 17:11:30 -05:00
|
|
|
def broadcast(channel, payload)
|
|
|
|
end
|
|
|
|
|
|
|
|
def subscribe(channel, callback, success_callback = nil)
|
2018-05-31 11:32:52 -04:00
|
|
|
@@subscribe_called = { channel: channel, callback: callback, success_callback: success_callback }
|
2016-01-15 17:11:30 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def unsubscribe(channel, callback)
|
2018-05-31 11:32:52 -04:00
|
|
|
@@unsubscribe_called = { channel: channel, callback: callback }
|
2016-01-15 17:11:30 -05:00
|
|
|
end
|
|
|
|
end
|