Sha256: 4dfc80b2d8a67473c94c39c886d2fe803a1e98b141988c7554f99cd8a576c2a8
Contents?: true
Size: 503 Bytes
Versions: 1
Compression:
Stored size: 503 Bytes
Contents
module JPC class Handler attr_accessor :token def initialize(ws, dispatcher) @ws = ws @dispatcher = dispatcher end def ping(params = {}) "pong #{params}" end def subscribe(channel) @dispatcher.subscribe(@ws, channel) end def unsubscribe(channel) @dispatcher.unsubscribe(@ws, channel) end private def allowed_methods procedures + %w(ping subscribe unsubscribe) end def procedures [] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jpc-1.2.1 | lib/jpc/handler.rb |