Module: Enumerable

Defined in:
lib/assembly_pipe.rb,
bin/assembly_pipe

Instance Method Summary collapse

Instance Method Details

#drop_untilObject



5
6
7
8
9
10
11
12
13
# File 'lib/assembly_pipe.rb', line 5

def drop_until
  condition_met = false
  Enumerator.new do |yielder|
    self.each do |element|
      condition_met ||= yield(element)
      yielder << element if condition_met
    end
  end
end