class

Spectator::ExampleIterator

Inherits Iterator < Enumerable < Reference < Object

Iterates through all examples in a group and its nested groups.

Constructors

new(group : Iterable(ExampleComponent))

Creates a new iterator. The group is the example group to iterate through.

Source

Instance methods

next

Retrieves the next Example. If there are none left, then Iterator::Stop is returned.

Source
rewind

Restart the iterator at the beginning.

Source