lib/percheron/connection.rb in percheron-0.7.11 vs lib/percheron/connection.rb in percheron-0.7.12

- old
+ new

@@ -1,6 +1,5 @@ -require 'singleton' require 'docker' module Percheron class Connection @@ -12,15 +11,15 @@ instance.setup! instance end # rubocop:enable Style/ClassVars - def self.perform(klass, method, *args) - instance.perform(klass, method, *args) + def self.perform(klass, method, *args, &blk) + instance.perform(klass, method, *args, &blk) end def perform(klass, method, *args) - klass.public_send(method, *args) + klass.public_send(method, *args) { |out| yield(out) if block_given? } rescue => e $logger.debug '%s.%s(%s) - %s' % [ klass, method, args, e.inspect ] raise end