Sha256: e507cb8b9a0ef682d8f0a0e850a4b912ccafac1a1af5adab8954827185694db1
Contents?: true
Size: 411 Bytes
Versions: 13
Compression:
Stored size: 411 Bytes
Contents
# frozen_string_literal: true module Codebreaker module Entities class User include Validator USERNAME_CONSTRAINTS = { min: 3, max: 20 }.freeze attr_reader :name def initialize(name) @name = name validate end private def validate check_type(@name, String) check_length(@name, USERNAME_CONSTRAINTS) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems