Sha256: bb9735daaeea2564861a8f48b9971bc8985ba8f7be285b44d021703ecc8a565b

Contents?: true

Size: 805 Bytes

Versions: 6

Compression:

Stored size: 805 Bytes

Contents

module Wordlist
  module Modifiers
    #
    # Modifier base class.
    #
    # @since 1.0.0
    #
    class Modifier

      include Enumerable

      # The wordlist to modify.
      #
      # @return [Enumerable]
      attr_reader :wordlist

      #
      # Initializes the modifier.
      #
      # @param [Enumerable] wordlist
      #   The wordlist to modify.
      #
      def initialize(wordlist)
        @wordlist = wordlist
      end

      #
      # Enumerates over every modification of every word in the wordlist.
      #
      # @yield [word]
      #
      # @yieldparam [String] word
      #
      # @return [Enumerator]
      #
      # @abstract
      #
      def each(&block)
        raise(NotImplementedError,"#{self.class}##{__method__} was not implemented")
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wordlist-1.1.1 lib/wordlist/modifiers/modifier.rb
wordlist-1.1.0 lib/wordlist/modifiers/modifier.rb
wordlist-1.0.3 lib/wordlist/modifiers/modifier.rb
wordlist-1.0.2 lib/wordlist/modifiers/modifier.rb
wordlist-1.0.1 lib/wordlist/modifiers/modifier.rb
wordlist-1.0.0 lib/wordlist/modifiers/modifier.rb