Class: Command::Results::ListIterator
- Inherits:
-
Object
- Object
- Command::Results::ListIterator
- Includes:
- Enumerable
- Defined in:
- lib/command-set/result-list.rb
Overview
Basically an Enumerator over a List. Give it any list element, and each will take you to the end of the list.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(list) ⇒ ListIterator
constructor
A new instance of ListIterator.
Constructor Details
#initialize(list) ⇒ ListIterator
Returns a new instance of ListIterator.
287 288 289 |
# File 'lib/command-set/result-list.rb', line 287 def initialize(list) @list = list end |
Instance Method Details
#each ⇒ Object
291 292 293 294 295 296 297 |
# File 'lib/command-set/result-list.rb', line 291 def each thumb = @list until thumb.nil? yield thumb thumb = thumb.tree_order_next end end |