Recently reading the some posts about ruby I found myself with this interesting method call
This method will help us when looping over some objects: Array, Hashes, Files ……. If you want to loop though an array that is huge, an we only want to select the first 20 element that evaluate our criteria, this is the kind of job for our
1 2 3 4 5 6 7
This looks familiar but we may use the lazy method.
With Lazy method
1 2 3 4 5
This way the syntax is more clear and is better in performance.