3 ms·
Programming Made Easy with Ruby Enumerables
- gorgoiler 7y agoHmmm. This is pretty basic. (Edit: to the author: condensing down your examples, then including information on Enumerator would be a good improvement.) A related public service announcement though: for a long time — too long — I knew about Enumerable, but not about Enumerator. https://ruby-doc.org/core-2.6/Enumerator.html https://ruby-doc.org/core-2.6/Enumerator.html Use it when you want to return something Enumerable without yourself having to implement Enumerable.
- paulakshat 7y agoThanks, Gorgoiler for the feedback. Yes, it is basic as its part of Ruby Workshop new book on Ruby programming. Its actually for beginners (and gradually takes them to advance Ruby concepts). So stay tuned for more posts :)