module Codebreaker class Player include Mixins::Validator NAME_SIZE = { min: 3, max: 20 }.freeze attr_reader :name def initialize(name) @name = name end def validate validate_length(@name, NAME_SIZE[:min], NAME_SIZE[:max]) end end end