Class: WithConnection::RangedConnectionPool::BasicRange
- Inherits:
-
Object
- Object
- WithConnection::RangedConnectionPool::BasicRange
- Defined in:
- lib/with_connection/ranged_connection_pool.rb
Instance Attribute Summary collapse
-
#hi ⇒ Object
readonly
Returns the value of attribute hi.
-
#lo ⇒ Object
readonly
Returns the value of attribute lo.
Instance Method Summary collapse
- #include?(val) ⇒ Boolean
-
#initialize(lo, hi) ⇒ BasicRange
constructor
A new instance of BasicRange.
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
#hi ⇒ Object (readonly)
Returns the value of attribute hi.
51 52 53 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 51 def hi @hi end |
#lo ⇒ Object (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
58 59 60 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 58 def include?(val) val >= lo && val <= hi end |