Module: HashValidator

Defined in:
Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb

Instance Method Summary collapse

Instance Method Details

#assert_valid_keys(*valid_keys) ⇒ Object

Raises:

  • (CaskError)


2
3
4
5
6
# File 'Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb', line 2

def assert_valid_keys(*valid_keys)
  unknown_keys = keys - valid_keys
  return if unknown_keys.empty?
  raise CaskError, %Q(Unknown keys: #{unknown_keys.inspect}. Running "#{UPDATE_CMD}" will likely fix it.)
end