Sha256: c1c6901561f1b7a643f6601285c5c2f48e471d48664ce575db9cd3138302cf50

Contents?: true

Size: 298 Bytes

Versions: 4

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

module Codebreaker
  class SecretCode
    extend Validation
    include Valid

    attr_accessor :value

    validate :value, presence: true, type: Integer, length: [4], values: (1..6)

    def initialize(value)
      @value = value
      validate!
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
codebreaker_al-0.1.2 lib/secret_code.rb
codebreaker_al-0.1.1 lib/secret_code.rb
codebreaker_al_rg-0.1.0 lib/secret_code.rb
codebreaker_al-0.1.0 lib/secret_code.rb