Method: PreCommit::Configuration::Providers#update
- Defined in:
- lib/pre-commit/configuration/providers.rb
#update(plugin_name, name, operation, list) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/pre-commit/configuration/providers.rb', line 27 def update(plugin_name, name, operation, list) plugin = find_update_plugin(plugin_name) name = name.to_sym value = plugin[name] || [] raise PreCommit::NotAnArray.new unless Array === value value = value.send(operation, list) plugin.update(name, value) end |