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.

take

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

2015-04-05 02:16:22
grep

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

2015-04-05 00:26:11
to_set

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

2015-04-05 02:25:23
member?

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

2015-04-05 01:11:48
partition

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

2015-04-05 01:35:53
min

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

2015-04-05 01:15:40
each_entry

enum.each_entry { |obj| block } â enumenum.each_entry â an_enumerator Instance Public methods

2015-04-04 23:49:08
each_with_index

enum.each_with_index(*args) { |obj, i| block } â enumenum.each_with_index(*args) â an_enumerator

2015-04-04 23:54:41
take_while

enum.take_while { |arr| block } â arrayenum.take_while â an_enumerator Instance Public methods

2015-04-05 02:17:40
one?

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

2015-04-05 01:29:09