Class: Overcommit::ConfigurationValidator
- Inherits:
-
Object
- Object
- Overcommit::ConfigurationValidator
- Defined in:
- lib/overcommit/configuration_validator.rb
Overview
Validates and normalizes a configuration.
Instance Method Summary collapse
-
#validate(hash, options) ⇒ Hash
Validates hash for any invalid options, normalizing where possible.
Instance Method Details
#validate(hash, options) ⇒ Hash
Validates hash for any invalid options, normalizing where possible.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/overcommit/configuration_validator.rb', line 11 def validate(hash, ) @options = .dup @log = [:logger] hash = convert_nils_to_empty_hashes(hash) ensure_hook_type_sections_exist(hash) check_for_missing_enabled_option(hash) unless @options[:default] hash end |