Sha256: d5ed00a5a90d385a15a620c3f266a6c73ea1c3ff567ea8eedcb271022b100ee9
Contents?: true
Size: 324 Bytes
Versions: 18
Compression:
Stored size: 324 Bytes
Contents
require 'singleton' class Clients include Singleton def initialize @clients = {} end def [](client_name) @clients[client_name] ||= TestClient.new end def close @clients.values.each(&:close) end end def client(client_name = nil) client_name ||= 'client' Clients.instance[client_name] end
Version data entries
18 entries across 18 versions & 2 rubygems