First, you have to decide where the implementation should live. To do that, you have to find out where the Enumerator::Lazy method lives. If you head over to the official documentation, you might find a clue shown in the figure.
So, the Enumerator class is the parent of the Lazy class. This is easy enough to translate to code:
|||class Lazy < Enumerator|
For our exercise, we’ll use another name instead of reopening the existing Ruby class. A quick trip to the thesaurus yields a synonym to Lazy. Introducing, Lax:
|||class Lax < Enumerator|
Notice that we’re inheriting from ...