Class: Chef::ResourceCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/rewind.rb

Instance Method Summary collapse

Instance Method Details

#delete_resource(resource_id) ⇒ Object



70
71
72
73
74
75
76
# File 'lib/chef/rewind.rb', line 70

def delete_resource(resource_id)
  lookup resource_id

  # assumes `resource_id` is the same as `Chef::Resource#to_s`
  @resources.delete_if {|r| r.to_s == resource_id }
  @resources_by_name.delete resource_id
end