Class: WithConnection::RangedConnectionPool::Item
- Inherits:
-
Object
- Object
- WithConnection::RangedConnectionPool::Item
- Defined in:
- lib/with_connection/ranged_connection_pool.rb
Instance Attribute Summary collapse
-
#pool ⇒ Object
readonly
Returns the value of attribute pool.
-
#range ⇒ Object
readonly
Returns the value of attribute range.
Instance Method Summary collapse
- #include?(key) ⇒ Boolean
-
#initialize(range, pool) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(range, pool) ⇒ Item
Returns a new instance of Item.
46 47 48 49 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 46 def initialize(range, pool) @range = range @pool = pool end |
Instance Attribute Details
#pool ⇒ Object (readonly)
Returns the value of attribute pool.
44 45 46 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 44 def pool @pool end |
#range ⇒ Object (readonly)
Returns the value of attribute range.
44 45 46 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 44 def range @range end |
Instance Method Details
#include?(key) ⇒ Boolean
51 52 53 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 51 def include?(key) @range.include? key end |