lib/nonnative/pool.rb in nonnative-1.19.0 vs lib/nonnative/pool.rb in nonnative-1.20.0
- old
+ new
@@ -12,9 +12,14 @@
def stop(&block)
[processes, servers].each { |t| process(t, :stop, :closed?, &block) }
end
+ def server_by_name(name)
+ index = configuration.servers.find_index { |s| s.name == name }
+ servers[index].first
+ end
+
private
attr_reader :configuration
def processes