End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
module · Ruby 3.0
Enumerable
60 instance methods
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.
Instance methods 60
#all?
#any?
#chain
#chunk
#chunk_while
#collect
#collect_concat
#count
#cycle
#detect
#drop
#drop_while
#each_cons
#each_entry
#each_slice
#each_with_index
#each_with_object
#entries
#filter
#filter_map
#find
#find_all
#find_index
#first
#flat_map
#grep
#grep_v
#group_by
#include?
#inject
#lazy
#map
#max
#max_by
#member?
#min
#min_by
#minmax
#minmax_by
#none?
#one?
#partition
#reduce
#reject
#reverse_each
#select
#slice_after
#slice_before
#slice_when
#sort
#sort_by
#sum
#take
#take_while
#tally
#to_a
#to_h
#to_set
#uniq
#zip