Skip to content

Tag Archives: Ruby Enumerable-class

The take_while() of enumerable is an inbuilt method in Ruby returns all the elements till the first element which returns a false to the condition… Read More
The group_by() of enumerable is an inbuilt method in Ruby returns an hash where the groups are collectively kept as the result of the block… Read More
The each_with_index() of enumerable is an inbuilt method in Ruby hashes the items in the enumerable according to the given block. In case no block… Read More
The sort_by() of enumerable is an inbuilt method in Ruby sorts enum using a set of keys generated by mapping the values in enum through… Read More
The each_with_object() of enumerable is an inbuilt method in Ruby iterates for every object and returns the initial object. It returns the enumerator, if no… Read More
The all?() of enumerable is an inbuilt method in Ruby returns a boolean value true if all the objects in the enumerable satisfies the given… Read More
The each_slice() of enumerable is an inbuilt method in Ruby iterates for each range of N elements and prints them. If no block is given,… Read More
The find() 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
The none?() of enumerable is an inbuilt method in Ruby returns a boolean value true if none of the objects in the enumerable satisfies the… Read More
The partition() of enumerable is an inbuilt method in Ruby returns two arrays, one containing the elements of the enumerable which return true, while the… Read More
The entries() of enumerable is an inbuilt method in Ruby returns the items in the enumerable. Syntax: enu.entries Parameters: The function does not takes any… Read More
The any?() of enumerable is an inbuilt method in Ruby returns a boolean value if any of the object in the enumerable satisfies the given… Read More
The member?() 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 to_a() of enumerable is an inbuilt method in Ruby returns an array containing all the items of the enumerable. Syntax: enu.to_a() Parameters: The function… Read More
The take() of enumerable is an inbuilt method in Ruby returns the first N elements from the enumerable. If it does not have N elements,… Read More

Start Your Coding Journey Now!