class Hokaido::Watcher

Public Class Methods

new(socket) click to toggle source
# File lib/hokaido/watcher.rb, line 9
def initialize(socket)
  @socket = socket

  subscribe 'broadcast', :received
end

Public Instance Methods

received(topic, chunk) click to toggle source
# File lib/hokaido/watcher.rb, line 15
def received(topic, chunk)
  @socket.write chunk
end