Sha256: 9cd93497f8656d135522932e443fa4935afd978e8c3fddef84627b5d4acde406
Contents?: true
Size: 375 Bytes
Versions: 10
Compression:
Stored size: 375 Bytes
Contents
# frozen_string_literal: true module CodebreakerRuban class User include Validation attr_accessor :errors attr_reader :name RANGE_NAME = (3..20).freeze def initialize(name) @name = name @errors = [] end def validate(name) return errors << Message.error_name_size(RANGE_NAME) unless size(name, RANGE_NAME) end end end
Version data entries
10 entries across 10 versions & 1 rubygems