Skip to content

Commit bb20042

Browse files
committed
Minor reorganization.
1 parent bdbe8a2 commit bb20042

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/pond.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ class Timeout < StandardError; end
77

88
attr_reader :allocated, :available, :collection
99

10-
def self.wrap(*args, &block)
11-
Wrapper.new(*args, &block)
12-
end
13-
1410
def initialize(options = {}, &block)
1511
@monitor = Monitor.new
1612
@cv = Monitor::ConditionVariable.new(@monitor)
@@ -108,6 +104,12 @@ def sync(&block)
108104
@monitor.synchronize(&block)
109105
end
110106

107+
class << self
108+
def wrap(*args, &block)
109+
Wrapper.new(*args, &block)
110+
end
111+
end
112+
111113
class Wrapper < BasicObject
112114
attr_reader :pond
113115

0 commit comments

Comments
 (0)