Class: WithConnection::RangedConnectionPool::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/with_connection/ranged_connection_pool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(range, pool) ⇒ Item

Returns a new instance of Item.



40
41
42
43
# File 'lib/with_connection/ranged_connection_pool.rb', line 40

def initialize(range, pool)
  @range = range
  @pool = pool
end

Instance Attribute Details

#poolObject (readonly)

Returns the value of attribute pool.



38
39
40
# File 'lib/with_connection/ranged_connection_pool.rb', line 38

def pool
  @pool
end

#rangeObject (readonly)

Returns the value of attribute range.



38
39
40
# File 'lib/with_connection/ranged_connection_pool.rb', line 38

def range
  @range
end

Instance Method Details

#include?(key) ⇒ Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/with_connection/ranged_connection_pool.rb', line 45

def include?(key)
  @range.include? key
end