Class: PreCommit::Configuration::Providers::Yaml

Inherits:
Object
  • Object
show all
Includes:
TopLevel
Defined in:
lib/plugins/pre_commit/configuration/providers/yaml.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from TopLevel

#top_level

Class Method Details

.priorityObject



11
12
13
# File 'lib/plugins/pre_commit/configuration/providers/yaml.rb', line 11

def self.priority
  20
end

Instance Method Details

#[](name) ⇒ Object



15
16
17
# File 'lib/plugins/pre_commit/configuration/providers/yaml.rb', line 15

def [](name)
  config[name]
end

#update(name, value) ⇒ Object



19
20
21
22
23
# File 'lib/plugins/pre_commit/configuration/providers/yaml.rb', line 19

def update(name, value)
  content = read_config(local_file)
  content[name] = value
  save_config(local_file, content)
end