lib/zold/remotes.rb
# The default TCP port all nodes are supposed to use.
The default TCP port all nodes are supposed to use.
The default TCP port all nodes are supposed to use .
def rescore(host, port, score)
      raise 'Host can\'t be nil' if host.nil?
      raise 'Port can\'t be nil' if port.nil?
      raise 'Score can\'t be nil' if score.nil?
      raise 'Port has to be of type Integer' unless port.is_a?(Integer)
      raise "#{host}:#{port} is absent" unless exists?(host, port)
      list = load
      list.find { |r| r[:host] == host.downcase && r[:port] == port }[:score] = score
      save(list)
    end
def rescore ( host , port , score ) raise 'Host can\'t be nil' if host . nil? raise 'Port can\'t be nil' if port . nil? raise 'Score can\'t be nil' if score . nil? raise 'Port has to be of type Integer' unless port . is_a? ( Integer ) raise "#{host}:#{port} is absent" unless exists? ( host , port ) list = load list . find { | r | r [ :host ] == host . downcase && r [ :port ] == port } [ :score ] = score save ( list ) end
The default TCP port all nodes are supposed to use.
The default TCP port all nodes are supposed to use .
host
<not_specific>
port
<not_specific>
score
<not_specific>