Sha256: 5ef6bd957ad1a852f76aee5e089a3f6936a0187e9222299d16729cbcbbcdc98f

Contents?: true

Size: 272 Bytes

Versions: 4

Compression:

Stored size: 272 Bytes

Contents

# frozen_string_literal: true

module Codebreaker
  class User
    extend Validation
    include Valid

    attr_reader :name

    validate :name, presence: true, type: String, length: (3..20)

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

Version data entries

4 entries across 4 versions & 2 rubygems

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