Sha256: 0f59cbb5cbe53d2d12da75582e9d8064c6526230db7815fd60c566645dfd237a

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 Bytes

Contents

require 'wordlist/modifiers/mutate'

module Wordlist
  module Modifiers
    #
    # Lazily enumerates through every possible upper/lower-case variation of
    # each word in the wordlist.
    #
    # @since 1.0.0
    #
    class MutateCase < Mutate

      #
      # Initializes the case mutator.
      #
      # @param [Enumerable] wordlist
      #   The wordlist to modify.
      #
      def initialize(wordlist)
        super(wordlist,/[[:alpha:]]/) { |letter| letter.swapcase }
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wordlist-1.0.0 lib/wordlist/modifiers/mutate_case.rb