Class: WithConnection::RangedConnectionPool::BasicRange

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(lo, hi) ⇒ BasicRange

Returns a new instance of BasicRange.



59
60
61
62
# File 'lib/with_connection/ranged_connection_pool.rb', line 59

def initialize(lo, hi)
  @lo = lo
  @hi = hi
end

Instance Attribute Details

#hiObject (readonly)

Returns the value of attribute hi.



57
58
59
# File 'lib/with_connection/ranged_connection_pool.rb', line 57

def hi
  @hi
end

#loObject (readonly)

Returns the value of attribute lo.



57
58
59
# File 'lib/with_connection/ranged_connection_pool.rb', line 57

def lo
  @lo
end

Instance Method Details

#include?(val) ⇒ Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/with_connection/ranged_connection_pool.rb', line 64

def include?(val)
  val >= lo && val <= hi
end