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.



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

#poolObject (readonly)

Returns the value of attribute pool.



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

def pool
  @pool
end

#rangeObject (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

Returns:

  • (Boolean)


51
52
53
# File 'lib/with_connection/ranged_connection_pool.rb', line 51

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