Method: Inspec::Plugin::V2::ConfigFile#remove_entry

Defined in:
lib/inspec/plugin/v2/config_file.rb

#remove_entry(name) ⇒ Object

Removes an entry specified by plugin name.



56
57
58
59
60
61
# File 'lib/inspec/plugin/v2/config_file.rb', line 56

def remove_entry(name)
  unless existing_entry?(name)
    raise Inspec::Plugin::V2::ConfigError, "No such entry with plugin name '#{name}'"
  end
  @data[:plugins].delete_if { |entry| entry[:name] == name.to_sym }
end