Sha256: 6a11de3a1df2fd840c319114e675375f943ed0bfed9a99592c86defc1048c139
Contents?: true
Size: 496 Bytes
Versions: 9
Compression:
Stored size: 496 Bytes
Contents
module Cuboid module RPC class Server class Instance class Peers include Enumerable def initialize @peers = {} end def set( peer_info ) peer_info.each do |url, token| next if url == self.self_url @peers[url] = Cuboid::Application.application.connect( url: url, token: token ) end nil end def each( &block ) @peers.each do |_, client| block.call client end end def self_url Cuboid::Options.rpc.url end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems