Sha256: 02adc97f2ef62952812e3399e9b9f3fbb6b749d6397e26c3c98cbca863e94aa1
Contents?: true
Size: 516 Bytes
Versions: 16
Compression:
Stored size: 516 Bytes
Contents
module Natives class Catalog class Validator def ensure_valid_catalog_groups(hash) unless hash.kind_of? Hash raise ArgumentError, 'catalog should be a Hash' end invalid_groups = hash.select {|key, value| !value.kind_of?(Hash) } unless invalid_groups.empty? group_names = invalid_groups.keys raise ArgumentError, "The following catalog group(s) should be a Hash: #{group_names.join(', ')}" end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems