If I wanted to do something like this:
collection.each do |i| return nil if i == 3 ..many lines of code here.. end
How would I get t
#!/usr/bin/ruby collection = [1, 2, 3, 4, 5 ] stopped_at = collection.each do |i| break i if i == 3 puts "Processed #{i}" end puts "Stopped at and did not process #{stopped_at}"