Method: ChefAPI::Resource::Base.delete

Defined in:
lib/chef-api/resources/base.rb

.delete(id, prefix = {}) ⇒ true

Delete the remote resource from the Chef Sserver.

Parameters:

  • id (String, Fixnum)

    the id of the resource to delete

  • prefix (Hash) (defaults to: {})

    the list of prefix options (for nested resources)

Returns:

  • (true)


176
177
178
179
180
181
182
# File 'lib/chef-api/resources/base.rb', line 176

def delete(id, prefix = {})
  path = resource_path(id, prefix)
  connection.delete(path)
  true
rescue Error::HTTPNotFound
  true
end