Sha256: f8ac6e2c1c775869b5340b2a6c80fd65713cf76509eead74b672175a4f6d0a92

Contents?: true

Size: 392 Bytes

Versions: 7

Compression:

Stored size: 392 Bytes

Contents

# frozen_string_literal: true

require_relative 'character_set'

module RakeSecrets
  module Types
    class Numeric
      NUMBER_CHARACTERS = ('0'..'9').to_a

      def initialize(opts = {})
        @delegate = CharacterSet.new(
          NUMBER_CHARACTERS,
          length: opts[:length] || 32
        )
      end

      def generate
        @delegate.generate
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rake_secrets-0.3.0.pre.2 lib/rake_secrets/types/numeric.rb
rake_secrets-0.3.0.pre.1 lib/rake_secrets/types/numeric.rb
rake_secrets-0.2.0 lib/rake_secrets/types/numeric.rb
rake_secrets-0.1.0.pre.8 lib/rake_secrets/types/numeric.rb
rake_secrets-0.1.0.pre.7 lib/rake_secrets/types/numeric.rb
rake_secrets-0.1.0.pre.6 lib/rake_secrets/types/numeric.rb
rake_secrets-0.1.0.pre.5 lib/rake_secrets/types/numeric.rb