List
Creates a new FlatFile list with the specified path and given options.
# File lib/wordlist/flat_file.rb, line 13 def initialize(path,options={},&block) @path = path super(options,&block) end
Enumerates through every word in the flat-file, passing each word to the given block.
flat_file.each_word do |word|
puts word
end
# File lib/wordlist/flat_file.rb, line 27 def each_word(&block) File.open(@path) do |file| file.each_line do |line| yield line.chomp end end end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.