2012/5/18 Christoph Pilka <
c.p...@asconix.com>:
> In one of my cases I have to execute exactly the same code within
> callback as well as in errback. How would you avoid DRY in such
> situation?
Some EM methods allows both a Proc instance of a block. In the former
case you can do:
my_proc = Proc.new do |param|
# do something with param
end
em_object.callback(my_proc)
em_object.errback(my_proc)
--
Iñaki Baz Castillo
<
i...@aliax.net>