Method: Wordlist::File#each
- Defined in:
- lib/wordlist/file.rb
#each {|word| ... } ⇒ Enumerator
Note:
Empty lines and lines beginning with # characters will be ignored.
Enumerates through every word in the .txt file.
147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/wordlist/file.rb', line 147 def each return enum_for(__method__) unless block_given? each_line do |line| line.chomp! unless (line.empty? || line.start_with?('#')) yield line end end end |