What does the each_slice method do in Ruby enumerators?
A. Iterates over each consecutive sequence of a given size in a collection
B. Splits a collection into slices before elements that satisfy a given condition
C. Iterates over each element in a collection along with its index
D. Checks if any element satisfies a given condition
Answer: Option A
A. A predefined set of instructions for performing a specific task
B. A data structure that stores elements sequentially
C. A method that iterates over elements in a collection
D. A method that repeatedly calls a block of code
Which method is used to create an enumerator in Ruby?
A. Enumerable.create
B. Enumerator.create
C. Enumerable.new
D. Enumerator.new
What is the purpose of the each method in Ruby iterators?
A. To iterate over each element in a collection
B. To filter elements in a collection
C. To map elements to a new collection
D. To sort elements in a collection
What does the map method do in Ruby enumerators?
A. Sorts elements in a collection
B. Removes duplicate elements from a collection
C. Selects elements from a collection based on a condition
D. Applies a block of code to each element and returns a new collection

Join The Discussion