Sha256: 6f3e0a51843375730b3121c8d7d4768145bcc4997d71f2773e4c51caabcbeb06
Contents?: true
Size: 411 Bytes
Versions: 6
Compression:
Stored size: 411 Bytes
Contents
# frozen_string_literal: true # Main Gem module module CodeBrkrGameTraining # Class for game user 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
Version data entries
6 entries across 6 versions & 1 rubygems