Sha256: 462a9117785a812cd771aac3fbddbc963515b2786c9a82425782a26435ddbea8
Contents?: true
Size: 455 Bytes
Versions: 1
Compression:
Stored size: 455 Bytes
Contents
# frozen_string_literal: true require 'singleton' require 'switch_point/proxy' module SwitchPoint class ProxyRepository include Singleton def self.checkout(name) instance.checkout(name) end def self.find(name) instance.find(name) end def checkout(name) proxies[name] ||= Proxy.new(name) end def find(name) proxies.fetch(name) end def proxies @proxies ||= {} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switch_point-0.9.0 | lib/switch_point/proxy_repository.rb |