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.
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
#hi ⇒ Object (readonly)
Returns the value of attribute hi.
57 58 59 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 57 def hi @hi end |
#lo ⇒ Object (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
64 65 66 |
# File 'lib/with_connection/ranged_connection_pool.rb', line 64 def include?(val) val >= lo && val <= hi end |