Sha256: 3a5d9c3bf576b3e543989a813eca74528f51c8713609eefd1594d957fc1c84fd

Contents?: true

Size: 678 Bytes

Versions: 11

Compression:

Stored size: 678 Bytes

Contents

module AlexCodebreaker
  module Modules
    module ArgumentsValidation
      include AlexCodebreaker::Modules::Validators
      def name_validation(name)
        argument_min_length_check(name, AlexCodebreaker::Modules::Settings::MIN_PLAYER_NAME_LENGTH) &&
          argument_max_length_check(name, AlexCodebreaker::Modules::Settings::MAX_PLAYER_NAME_LENGTH)
      end

      def guess_validation(guess)
        argument_length_check(guess, AlexCodebreaker::Modules::Settings::CODE_LENGTH) &&
          digits_check(guess, AlexCodebreaker::Modules::Settings::CODE_MIN_DIGIT,
                       AlexCodebreaker::Modules::Settings::CODE_MAX_DIGIT)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alex_codebreaker-0.2.3 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.2.2 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.2.1 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.2.0 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.13 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.12 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.11 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.10 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.9 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.8 lib/alex_codebreaker/modules/arguments_validation.rb
alex_codebreaker-0.1.7 lib/alex_codebreaker/modules/arguments_validation.rb