Class: GitHub::Ldap::ConnectionCache
- Inherits:
-
Object
- Object
- GitHub::Ldap::ConnectionCache
- Defined in:
- lib/github/ldap/connection_cache.rb
Overview
A simple cache of GitHub::Ldap objects to prevent creating multiple instances of connections that point to the same URI/host.
Class Method Summary collapse
-
.get_connection(options = {}) ⇒ Object
Public - Create or return cached instance of GitHub::Ldap created with options, where the cache key is the value of options.
Instance Method Summary collapse
Class Method Details
.get_connection(options = {}) ⇒ Object
Public - Create or return cached instance of GitHub::Ldap created with options, where the cache key is the value of options.
options - Initialization attributes suitable for creating a new connection with GitHub::Ldap.new(options)
Returns true or false.
15 16 17 18 |
# File 'lib/github/ldap/connection_cache.rb', line 15 def self.get_connection(={}) @cache ||= self.new @cache.get_connection() end |