module Iterator::IteratorWrapper
Overview
IteratorWrapper
eliminates some boilerplate when defining an Iterator
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
next
on the wrapped iterator and returnsstop
if the given value was aIterator::Stop
.
Macro Detail
macro wrapped_nextSource
Invokes next
on the wrapped iterator and returns stop
if the given value was a Iterator::Stop
. Otherwise, returns the value.
© 2012–2021 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.2.1/Iterator/IteratorWrapper.html