Sha256: 2864627e209b745ba32d615bd3ed0f0b319e98dd28cf760e56b632c5673e480f
Contents?: true
Size: 365 Bytes
Versions: 9
Compression:
Stored size: 365 Bytes
Contents
module Codebreaker class User < BaseClass USERNAME_LENGTH_RANGE = (3..20).freeze attr_reader :username, :errors def initialize(username_new) @username = username_new @errors = {} end private def validate @errors[:user] = 'error_name_length' unless validate_length?(@username, USERNAME_LENGTH_RANGE) end end end
Version data entries
9 entries across 9 versions & 1 rubygems