Class: SwitchPoint::ProxyRepository
- Inherits:
-
Object
- Object
- SwitchPoint::ProxyRepository
- Includes:
- Singleton
- Defined in:
- lib/switch_point/proxy_repository.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.checkout(name) ⇒ Object
8 9 10 |
# File 'lib/switch_point/proxy_repository.rb', line 8 def self.checkout(name) instance.checkout(name) end |
.find(name) ⇒ Object
12 13 14 |
# File 'lib/switch_point/proxy_repository.rb', line 12 def self.find(name) instance.find(name) end |
Instance Method Details
#checkout(name) ⇒ Object
16 17 18 |
# File 'lib/switch_point/proxy_repository.rb', line 16 def checkout(name) proxies[name] ||= Proxy.new(name) end |
#find(name) ⇒ Object
20 21 22 |
# File 'lib/switch_point/proxy_repository.rb', line 20 def find(name) proxies.fetch(name) end |
#proxies ⇒ Object
24 25 26 |
# File 'lib/switch_point/proxy_repository.rb', line 24 def proxies @proxies ||= {} end |