Method: Wordlist::Operators::Unique#each
- Defined in:
- lib/wordlist/operators/unique.rb
#each {|word| ... } ⇒ Enumerator
Enumerates over the unique words in the wordlist.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/wordlist/operators/unique.rb', line 39 def each return enum_for(__method__) unless block_given? unique_filter = UniqueFilter.new @wordlist.each do |word| if unique_filter.add?(word) yield word end end end |