Sha256: ce70905df532f31ca6fce8ea80e9aff1a10d011ebfd83a20a49c205d418a4320

Contents?: true

Size: 274 Bytes

Versions: 1

Compression:

Stored size: 274 Bytes

Contents

module Codebreaker
  module Validation
    def name_valid?(name)
      name.length.between? 3, 20
    end

    def guess_valid?(guess)
      /^[1-6]{4}$/.match? guess
    end

    def difficult_valid?(level)
      !Constants::DIFFICULTS[level.to_sym].nil?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
codebreaker_dmitriev-0.2.1 lib/codebreaker/validation.rb