Sha256: d4469e06f4ed8f0bbb10a8be0e1179636d6bc4de0b366385b819e115e5bff36e
Contents?: true
Size: 235 Bytes
Versions: 11
Compression:
Stored size: 235 Bytes
Contents
class Hash def assert_valid_keys(*valid_keys) each_key do |k| next if valid_keys.include?(k) raise ArgumentError, "unknown key: #{k.inspect}. valid keys are: #{valid_keys.map(&:inspect).join(', ')}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems