Type:
Module

The Enumerable mixin provides collection classes with several traversal and searching methods, and with the ability to sort. The class must provide a method each, which yields successive members of the collection. If Enumerable#max, #min, or #sort is used, the objects in the collection must also implement a meaningful <=> operator, as these methods rely on an ordering between members of the collection.

to_a

enum.to_a â array Instance Public methods Returns an array containing the

2015-04-05 02:21:54
member?

enum.member?(obj) â true or false Instance Public methods Returns true

2015-04-05 01:11:48
group_by

enum.group_by { |obj| block } â a_hashenum.group_by â an_enumerator Instance Public methods

2015-04-05 00:33:24
min

enum.min â objenum.min { |a, b| block } â obj Instance Public methods

2015-04-05 01:15:40
to_set

to_set(klass = Set, *args, &block) Instance Public methods Makes a set from

2015-04-05 02:25:23
grep

enum.grep(pattern) â arrayenum.grep(pattern) { |obj| block } â array Instance Public methods

2015-04-05 00:26:11
find_index

enum.find_index(value) â int or nilenum.find_index { |obj| block } â int or nilenum.find_index â an_enumerator

2015-04-05 00:16:24
one?

enum.one? [{ |obj| block }] â true or false Instance Public methods Passes

2015-04-05 01:29:09
zip

enum.zip(arg, ...) â an_array_of_arrayenum.zip(arg, ...) { |arr| block } â nil Instance

2015-04-05 02:26:29
chunk

enum.chunk { |elt| ... } â an_enumeratorenum.chunk(initial_state) { |elt, state| ... } â an_enumerator

2015-04-04 23:12:26