Sha256: 0e7d4656cb3c16be0c4ffbeee8ed7bc1e562d3bb2560ff1310031e3ea1e5d689
Contents?: true
Size: 517 Bytes
Versions: 3
Compression:
Stored size: 517 Bytes
Contents
# frozen_string_literal: true module Codebreaker module Validator def check_cover?(cheackable, valid_numbers) valid_numbers.cover?(cheackable.size) end def check_include?(cheackable, valid_collection) valid_collection.include?(cheackable) end def check_size?(cheackable, valid_size) cheackable.size == valid_size end def check_numbers?(cheackable, valid_numbers) cheackable.each_char.all? { |guess_char| valid_numbers.include?(guess_char) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems