Class: Wayfarer::Networking::Pool
- Inherits:
-
Object
- Object
- Wayfarer::Networking::Pool
- Includes:
- Singleton
- Defined in:
- lib/wayfarer/networking/pool.rb
Instance Attribute Summary collapse
-
#pool ⇒ Object
readonly
Returns the value of attribute pool.
Instance Method Summary collapse
- #free ⇒ Object
-
#initialize ⇒ Pool
constructor
A new instance of Pool.
- #with ⇒ Object
Constructor Details
Instance Attribute Details
#pool ⇒ Object (readonly)
Returns the value of attribute pool.
21 22 23 |
# File 'lib/wayfarer/networking/pool.rb', line 21 def pool @pool end |
Instance Method Details
#free ⇒ Object
35 36 37 |
# File 'lib/wayfarer/networking/pool.rb', line 35 def free self.class.finalizer.call(@pool) end |
#with ⇒ Object
29 30 31 32 33 |
# File 'lib/wayfarer/networking/pool.rb', line 29 def with(&) @pool.with(&) rescue ConnectionPool::TimeoutError => e raise Wayfarer::UserAgentTimeoutError, e end |