Class: SSHKit::Backend::ConnectionPool::NilCache
- Inherits:
-
Struct
- Object
- Struct
- SSHKit::Backend::ConnectionPool::NilCache
- Defined in:
- lib/sshkit/backends/connection_pool/nil_cache.rb
Overview
A cache that holds no connections. Any connection provided to this cache is simply closed.
Instance Attribute Summary collapse
-
#closer ⇒ Object
Returns the value of attribute closer.
Instance Method Summary collapse
Instance Attribute Details
#closer ⇒ Object
Returns the value of attribute closer
3 4 5 |
# File 'lib/sshkit/backends/connection_pool/nil_cache.rb', line 3 def closer @closer end |
Instance Method Details
#pop ⇒ Object
4 5 6 |
# File 'lib/sshkit/backends/connection_pool/nil_cache.rb', line 4 def pop nil end |
#push(conn) ⇒ Object
8 9 10 |
# File 'lib/sshkit/backends/connection_pool/nil_cache.rb', line 8 def push(conn) closer.call(conn) end |
#same_key?(_key) ⇒ Boolean
12 13 14 |
# File 'lib/sshkit/backends/connection_pool/nil_cache.rb', line 12 def same_key?(_key) true end |