Skip to content

Tag Archives: Ruby Enumerable-class

The find_all() of enumerable is an inbuilt method in Ruby returns the items in the enumerable which satisfies the given condition in the block. It… Read More
The one?() of enumerable is an inbuilt method in Ruby returns a boolean value true if exactly one of the object in the enumerable satisfies… Read More
The collect() of enumerable is an inbuilt method in Ruby returns a new array with the results of running block once for every element in… Read More
The max_by() of enumerable is an inbuilt method in Ruby returns an array of maximum elements which satisfies the condition of the given block. It… Read More
The select() of enumerable is an inbuilt method in Ruby returns the items in the enumerable which satisfies the given condition in the block. It… Read More
The max() of enumerable is an inbuilt method in Ruby returns the maximum elements or an array containing the maximum N elements in the enumerable.… Read More
The reject() of enumerable is an inbuilt method in Ruby returns the items in the enumerable which does not satisfies the given condition in the… Read More
The find_index() of enumerable is an inbuilt method in Ruby returns the index of the item which returns true for the given condition in the… Read More
The sum() of enumerable is an inbuilt method in Ruby returns the sum of all the elements in the enumerable. If a block is given,… Read More
The first() of enumerable is an inbuilt method in Ruby returns the first N elements or the first element of the enumerable. If there is… Read More
The uniq function in Ruby is used to find the unique set of elements from the given array. Syntax: xs.uniq Here, xs is a array… Read More
The count() of enumerable is an inbuilt method in Ruby returns the number of elements in the enumerable, or the number of elements that are… Read More
The cycle() of enumerable is an inbuilt method in Ruby calls block for each element of enum repeatedly the given numbers times or forever if… Read More
The flat_map() of enumerable is an inbuilt method in Ruby returns a new array with the concatenated results of running block once for every element… Read More
The detect() of enumerable is an inbuilt method in Ruby returns the first element which satisfies the given condition in the block. If there is… Read More

Start Your Coding Journey Now!