summaryrefslogtreecommitdiff
path: root/lib/chef/resource_collection/resource_list.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource_collection/resource_list.rb')
-rw-r--r--lib/chef/resource_collection/resource_list.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/resource_collection/resource_list.rb b/lib/chef/resource_collection/resource_list.rb
index 9fe012d4c3..75305f63a6 100644
--- a/lib/chef/resource_collection/resource_list.rb
+++ b/lib/chef/resource_collection/resource_list.rb
@@ -95,6 +95,12 @@ class Chef
end
end
+ def self.from_hash(o)
+ collection = new()
+ resources = o["instance_vars"]["@resources"].map { |r| Chef::Resource.from_hash(r) }
+ collection.instance_variable_set(:@resources, resources)
+ collection
+ end
end
end
end