The Enumerable mixin provides a collection interface to all manner of collections in Ruby. A collection is just what it sounds like, any object that holds a collection of other objects. Common collections in Ruby are the Array and Hash, but anything that holds objects and implements the each method to iterate over them can use the Enumerable mixin. Of the most commonly used methods in Enumerable are the ones that allow you to select, copy, remove or sort elements based on a simple criteria.
Comments
No comments yet. Leave a Comment

