Sha256: a5f674fa2dfea9dd4145d17d89e59f06c41d7be643b531251b640a0e6918fbe6

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 Bytes

Contents

class Nanook
  class WorkPeer

    def initialize(rpc)
      @rpc = rpc
    end

    def add(address:, port:)
      rpc(:work_peer_add, address: address, port: port)
    end

    def clear
      rpc(:work_peers_clear)
    end

    def list
      rpc(:work_peers)
    end

    private

    def rpc(action, params={})
      @rpc.call(action, params)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nanook-0.6.3 lib/nanook/work_peer.rb
nanook-0.6.0 lib/nanook/work_peer.rb