module PipeRpc class Hub::Servers def initialize @servers = Hash.new{ |hash, key| raise NoServerError.new("no server #{key}") } end def add(servers) servers.each{ |name, server| @servers[name.to_sym] = server } end def [](name) @servers[name.to_sym] end def remove(name) @servers.delete(name.to_sym) end def registered?(name) @servers.has_key?(name) end end end