module Git::Configuring::Private
Internal helpers for {Git::Configuring}.
@api private
Public Instance Methods
Source
# File lib/git/configuring.rb, line 729 def assert_valid_opts!(allowed, **candidate_keywords) unknown = candidate_keywords.keys - allowed return if unknown.empty? raise ArgumentError, "Unknown options: #{unknown.join(', ')}" end
Validate that candidate option keys are listed in ‘allowed`
@param allowed [Array<Symbol>] the permitted option keys
@param candidate_keywords [Hash<Symbol, Object>] the keywords to validate
@option candidate_keywords [Object] key a candidate keyword value
@return [void]
@raise [ArgumentError] when any candidate key is not in ‘allowed`