Skip to content

Tag Archives: Ruby Enumerable-class

The uniq() of enumerable is an inbuilt method in Ruby returns an array removing all the duplicates in the given enum. Syntax: enu.uniq Parameters: The… Read More
The drop_while() of enumerable is an inbuilt method in Ruby returns an array containing the rest elements after dropping elements up to, but not including,… Read More
The grep() of enumerable is an inbuilt method in Ruby returns an array of elements which contain every (element == pattern), of all the elements… Read More
The include?() of enumerable is an inbuilt method in Ruby returns a boolean value. It returns true if the enumerable contains the given elements, or… Read More
The reverse_each() of enumerable is an inbuilt method in Ruby returns the elements of the temporary array. The temporary array contains the enumerable in reverse… Read More
The drop() of enumerable is an inbuilt method in Ruby returns the rest elements in the enumerator after dropping the first N elements. Syntax: block.drop(N)… Read More
The minmax() of enumerable is an inbuilt method in Ruby returns an array containing two elements. It contains the minimum and the maximum value in… Read More
The sort() of enumerable is an inbuilt method in Ruby returns an array which contains the enum items in a sorted order. The comparisons are… Read More
The min() of enumerable is an inbuilt method in Ruby returns the minimum elements or an array containing the minimum N elements in the enumerable.… Read More
The map() 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 min_by() of enumerable is an inbuilt method in Ruby returns an array of minimum elements which satisfies the condition of the given block. It… Read More
The grep_v() of enumerable is an inbuilt method in Ruby returns an array of elements which contain every (element != pattern). If the optional block… Read More
The each_cons() of enumerable is an inbuilt method in Ruby iterates for consecutive N elements starting from each element every time. If no block is… Read More
The collect_concat() 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 minmax_by() of enumerable is an inbuilt method in Ruby returns an array containing two elements. It contains the minimum and the maximum value in… Read More