Sha256: 7eda98c30a0ecf44fe97a6741e38c155b55dade086ebff3da8bad2fab6b27ae0

Contents?: true

Size: 309 Bytes

Versions: 4

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

module Validator
  VALUE_FORMAT = /^[1-6]{4}$/.freeze

  def check_emptyness(value)
    value.empty?
  end

  def check_length(value, min_size, max_size)
    value.size.between?(min_size, max_size)
  end

  def check_command_range(command)
    command =~ VALUE_FORMAT
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
codebreaker-yeroshek-0.1.1 lib/app/modules/validator.rb
codebreaker_rg-0.1.2 lib/app/modules/validator.rb
codebreaker_rg-0.1.1 lib/app/modules/validator.rb
codebreaker_rg-0.1.0 lib/app/modules/validator.rb