def each_word(&block)
      return enum_for(__method__) unless block

      if @path
        File.open(@path) do |file|
          file.each_line do |line|
            yield line.chomp
          end
        end
      elsif @words
        @words.each(&block)
      end
    end
def each_word(&block)
      return enum_for(__method__) unless block

      if @path
        File.open(@path) do |file|
          file.each_line do |line|
            yield line.chomp
          end
        end
      elsif @words
        @words.each(&block)
      end
    end
Iterates over each word in the list.

 @yield [word]
   The given block will be passed each word.

 @yieldparam [String] word
   A word from the list.

 @return [Enumerator]
   If no block is given, an Enumerator will be returned.

 @raise [RuntimeError]
   {#path} or {#words} must be set.

 @api public