module Enumerable

instance methods

Enumerable#nest &compare

nest is an inverse for Array#flatten. (Well, actually only a right inverse since flatten is not injective.) You give it a proc that calculates the depth of each item, and it returns a nesting of arrays in which each item has the desired depth. It can be used to parse strings with Python-like indentation syntax, but it isn't limited to strings.

version

Enumerable tools 1.5

The current version of this software can be found at http://redshift.sourceforge.net/enum .

license

This software is distributed under the Ruby license. See http://www.ruby-lang.org.

author

Joel VanderWerf, vjoel@users.sourceforge.net