Sha256: ea7f54ef4a77f1ceed98488a90f0d55dae68204c3513c1561e52ac29a4623aff

Contents?: true

Size: 222 Bytes

Versions: 8

Compression:

Stored size: 222 Bytes

Contents

module Codebreaker
  module Validation
    def name_is_valid?(name)
      name.instance_of?(String) && name.length.between?(3, 20)
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
codebreaker_kub-0.1.9 lib/codebreaker/validation.rb
codebreaker_kub-0.1.8 lib/codebreaker/validation.rb
codebreaker_kub-0.1.7 lib/codebreaker/validation.rb
codebreaker_kub-0.1.6 lib/codebreaker/validation.rb
codebreaker_kub-0.1.5 lib/codebreaker/validation.rb
codebreaker_kub-0.1.4 lib/codebreaker/validation.rb
codebreaker_kub-0.1.3 lib/codebreaker/validation.rb
codebreaker_kub-0.1.2 lib/codebreaker/validation.rb