module
Iterator::IteratorWrapper
Overview
IteratorWrapper eliminates some boilerplate when defining
anIterator that wraps another iterator.
To use it, include this module in your iterator and make sure that the wrapped
iterator is stored in the@iterator instance variable.
Defined in:
iterator.crMacro Summary
-
wrapped_next
Invokes
nexton the wrapped iterator and returnsstopif the given value was aIterator::Stop.
Macro Detail
macro wrapped_next
#
Invokesnext on the wrapped iterator and returnsstop if
the given value was aIterator::Stop. Otherwise, returns the value.