Sha256: dca02ec8eed881870db0133720a308b1b2b5a38e48cfc7cd1b01e9201fd2f0b1

Contents?: true

Size: 267 Bytes

Versions: 2

Compression:

Stored size: 267 Bytes

Contents

module AlexCodebreaker
  class IDGenerator
    MIN_NUMBER = 1
    MAX_NUMBER = 9_999_999_999

    attr_reader :unique_id

    def initialize
      @unique_id = generate_id
    end

    private

    def generate_id
      rand(MIN_NUMBER..MAX_NUMBER)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alex_codebreaker-0.2.0 lib/alex_codebreaker/id_generator.rb
alex_codebreaker-0.1.13 lib/alex_codebreaker/id_generator.rb