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.

all?

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

2015-04-04 23:03:15
find_all

enum.find_all { |obj| block } â arrayenum.find_all â an_enumerator Instance Public methods

2015-04-05 00:10:48
each_with_object

enum.each_with_object(obj) { |(*args), memo_obj| ... } â objenum.each_with_object(obj) â an_enumerator

2015-04-04 23:56:16
max_by

enum.max_by { |obj| block } â objenum.max_by â an_enumerator Instance Public methods

2015-04-05 01:05:12
each_cons

enum.each_cons(n) { ... } â nilenum.each_cons(n) â an_enumerator Instance Public methods

2015-04-04 23:44:17
flat_map

enum.flat_map { |obj| block } â arrayenum.flat_map â an_enumerator Instance Public

2015-04-05 00:24:54
entries

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

2015-04-04 23:57:02
inject

enum.inject(initial, sym) â objenum.inject(sym) â objenum.inject(initial) { |memo, obj| block } â objenum.inject { |memo,

2015-04-05 00:45:34
cycle

enum.cycle(n=nil) { |obj| block } â nilenum.cycle(n=nil) â an_enumerator Instance Public

2015-04-04 23:34:04
sort

enum.sort â arrayenum.sort { |a, b| block } â array Instance Public methods

2015-04-05 02:07:25