instance method
stream_decoder
Ruby on Rails edge
Since v5.0.7.2 Private — implementation detail, not part of the public APISignature
stream_decoder(handler = nil, coder:)
No documentation comment.
Parameters
-
handleropt = nil -
coderkeyreq
Source
# File actioncable/lib/action_cable/channel/streams.rb, line 200
def stream_decoder(handler = nil, coder:)
if coder
-> message do
message = coder.decode(message)
if handler
handler.(message)
else
message
end
end
else
handler
end
end
Defined in actioncable/lib/action_cable/channel/streams.rb line 200
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::Streams