Sha256: 8c58cfb324a72356a63a8abbf1fea77d412bd076fac5d3ae90b32507e6548fcc
Contents?: true
Size: 344 Bytes
Versions: 11
Compression:
Stored size: 344 Bytes
Contents
# frozen_string_literal: true module Codebreaker module Validator def check_type(data, check_type) raise TypeError, 'unexpected_type' unless data.instance_of? check_type end def check_length(data, check) raise ArgumentError, 'unexpected_length' unless (check[:min]..check[:max]).cover? data.length end end end
Version data entries
11 entries across 11 versions & 1 rubygems