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.

select

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

2015-04-05 01:55:33
flat_map

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

2015-04-05 00:24:54
find_all

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

2015-04-05 00:10:48
first

enum.first â obj or nilenum.first(n) â an_array Instance Public methods

2015-04-05 00:21:33
find

enum.find(ifnone = nil) { |obj| block } â obj or nilenum.find(ifnone = nil) â an_enumerator

2015-04-05 00:03:24
cycle

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

2015-04-04 23:34:04
take

enum.take(n) â array Instance Public methods Returns first n

2015-04-05 02:16:22
partition

enum.partition { |obj| block } â [ true_array, false_array ]enum.partition â an_enumerator

2015-04-05 01:35:53
slice_before

enum.slice_before(pattern) â an_enumeratorenum.slice_before { |elt| bool } â an_enumeratorenum.s

2015-04-05 02:00:06
min_by

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

2015-04-05 01:20:52