Sha256: d9a21aa12eea790d134527657880c4dc56fcffb8aba64330b026faeb90ffc3b0
Contents?: true
Size: 359 Bytes
Versions: 4
Compression:
Stored size: 359 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 << 'error_name_length' unless validate_length?(@username, USERNAME_LENGTH_RANGE) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
codebreaker-ga-0.2.5 | lib/codebreaker/user.rb |
codebreaker-ga-0.2.4 | lib/codebreaker/user.rb |
codebreaker-ga-0.2.3 | lib/codebreaker/user.rb |
codebreaker-ga-0.2.2 | lib/codebreaker/user.rb |