Class: Enumerator

Inherits:
Object
  • Object
show all
Defined in:
lib/delayer/deferred/enumerator.rb

Instance Method Summary collapse

Instance Method Details

#deach(delayer = Delayer, &proc) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/delayer/deferred/enumerator.rb', line 6

def deach(delayer=Delayer, &proc)
  delayer.Deferred.new.next do
    self.each do |node|
      delayer.Deferred.pass
      proc.(node)
    end
  end
end