Skip to content

Tag Archives: Ruby Array-class

Array#&() : &() is an Array class method which returns a new array containing unique elements common to the two arrays. Syntax: Array.&() Parameter: Array… Read More
Array#() : () is an Array class method which performs the comparison between the two arrays. Syntax: Array.() Parameter: Array for the comparison Return: 1… Read More
Array#repeated_permutation() : repeated_permutation() is a Array class method which returns all repeated permutations of length n of the elements of the array, then return the… Read More
Array#to_h() : to_h() is a Array class method which returns the result of interpreting ary as an array of [key, value] pairs. Syntax: Array.to_h() Parameter:… Read More
Array#to_ary() : to_ary() is a Array class method which returns self array representation. Syntax: Array.to_ary() Parameter: Array Return: self array representation. Example #1 : #… Read More
Array#to_a() : to_a() is a Array class method which returns self array. Syntax: Array.to_a() Parameter: Array Return: self array representation Example #1 : # Ruby… Read More
Array#take_while() : take_while() is a Array class method which returns elements to the block until the block returns nil or false. Syntax: Array.take_while() Parameter: Array… Read More
Array#repeated_combination() : repeated_combination() is a Array class method which returns all repeated combinations of length n of elements from the array and then returns the… Read More
Array#reject!() : reject!() is a Array class method which returns a new array containing the values which are not returned by the block. Syntax: Array.reject!()… Read More
Array#reject() : reject() is a Array class method which returns new array containing the items in the array for which the given block is not… Read More
Array#take() : take() is a Array class method which returns the number of elements in the array. Syntax: Array.take() Parameter: Array Return: the number of… Read More
Array#sort_by!() : sort_by!() is a Array class method which returns the enumerator for the sorted array.  Syntax: Array.sort_by!()Parameter: ArrayReturn: the enumerator for the sorted array.… Read More
Array#sort!() : sort!() is a Array class method which returns sorted self array in place. Syntax: Array.sort!() Parameter: Array Return: sorted self array in place.… Read More
Array#none?() : none?() is a Array class method which checks whether the array is empty or not. Syntax: Array.none?() Parameter: Array Return: true – if… Read More
Array#min() : min() is a Array class method which returns the minimum value in this array. Syntax: Array.min() Parameter: Array Return: the minimum value in… Read More

Start Your Coding Journey Now!