Sha256: 652e479784b9861e1aa7b9325754beae916020d838371ec5fe6662962a314f37
Contents?: true
Size: 453 Bytes
Versions: 13
Compression:
Stored size: 453 Bytes
Contents
class ServerList < Array def at(index) if index.is_a? String select do |server| server.endpoint == index end else super end end def <<(server) if at(server.endpoint).size == 0 super else raise ArgumentError, "Server at mount point #{server.endpoint} is already present." end end alias push << def clear! self.each do |server| server.stop end clear end end
Version data entries
13 entries across 13 versions & 1 rubygems