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.



53
54
55
56
# File 'lib/with_connection/ranged_connection_pool.rb', line 53

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

Instance Attribute Details

#hiObject (readonly)

Returns the value of attribute hi.



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

def hi
  @hi
end

#loObject (readonly)

Returns the value of attribute lo.



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

def lo
  @lo
end

Instance Method Details

#include?(val) ⇒ Boolean

Returns:

  • (Boolean)


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

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