Class: SSHKit::Backend::ConnectionPool::Entry
- Inherits:
-
Struct
- Object
- Struct
- SSHKit::Backend::ConnectionPool::Entry
- Defined in:
- lib/sshkit/backends/connection_pool.rb
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
Instance Method Summary collapse
Instance Attribute Details
#expires_at ⇒ Object
Returns the value of attribute expires_at.
54 55 56 |
# File 'lib/sshkit/backends/connection_pool.rb', line 54 def expires_at @expires_at end |
Instance Method Details
#closed? ⇒ Boolean
64 65 66 |
# File 'lib/sshkit/backends/connection_pool.rb', line 64 def closed? connection.respond_to?(:closed?) && connection.closed? end |
#expired? ⇒ Boolean
60 61 62 |
# File 'lib/sshkit/backends/connection_pool.rb', line 60 def expired? expires_at && Time.now > expires_at end |
#live? ⇒ Boolean
56 57 58 |
# File 'lib/sshkit/backends/connection_pool.rb', line 56 def live? !expired? && !closed? end |