module Iterator::IteratorWrapper

Overview

IteratorWrapper eliminates some boilerplatewhen defining anIterator thatwraps another iterator.

To use it, include this module in your iterator and make sure that thewrapped iterator is stored in the@iterator instance variable.

Defined in:

iterator.cr

Macro Summary

Macro Detail

macro wrapped_next #

Invokesnext on thewrapped iterator and returnsstop if the given valuewas aIterator::Stop. Otherwise, returns the value.