Class: Enumerator

Inherits:
Object
  • Object
show all
Defined in:
lib/iteration.rb

Instance Method Summary collapse

Instance Method Details

#iterationObject

:yield:



57
58
59
60
61
62
# File 'lib/iteration.rb', line 57

def iteration #:yield:
  it = Iteration.new(self)
  each do |e|
    it.__step__(e){ yield(it) }
  end
end

#with_iteration(&block) ⇒ Object

:yield:



64
65
66
67
68
69
# File 'lib/iteration.rb', line 64

def with_iteration(&block) #:yield:
  it = Iteration.new(self)
  each do |e|
    it.__step__(e){ yield(e,it) }
  end
end