Class: Overcommit::ConfigurationValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/overcommit/configuration_validator.rb

Overview

Validates and normalizes a configuration.

Instance Method Summary collapse

Instance Method Details

#validate(hash) ⇒ Object

Validates hash for any invalid options, normalizing where possible.



5
6
7
8
9
10
# File 'lib/overcommit/configuration_validator.rb', line 5

def validate(hash)
  hash = convert_nils_to_empty_hashes(hash)
  ensure_hook_type_sections_exist(hash)

  hash
end