module Codebreaker class Player include Mixins::Validatable NAME_MIN_SIZE = 3 NAME_MAX_SIZE = 20 attr_reader :name def initialize(name) @name = name validate end private def validate validate_length(@name, NAME_MIN_SIZE, NAME_MAX_SIZE) end end end