summaryrefslogtreecommitdiff
path: root/lib/chef/resource_collection.rb
diff options
context:
space:
mode:
authorKannan Manickam <arangamani.kannan@gmail.com>2013-03-08 00:05:20 -0800
committerBryan McLellan <btm@opscode.com>2013-04-11 14:31:26 -0700
commit4e5c6f9d4003011019134007bb0dea77d047082e (patch)
treed9cb57adc15516aa8f00f7d5c548d80e9c7efbb1 /lib/chef/resource_collection.rb
parent1b34d3f869304525f006e1222ffb4cc09157c226 (diff)
downloadchef-4e5c6f9d4003011019134007bb0dea77d047082e.tar.gz
removed duplicate for push in resource_collection
Diffstat (limited to 'lib/chef/resource_collection.rb')
-rw-r--r--lib/chef/resource_collection.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/chef/resource_collection.rb b/lib/chef/resource_collection.rb
index baf959c33b..e5bec91cce 100644
--- a/lib/chef/resource_collection.rb
+++ b/lib/chef/resource_collection.rb
@@ -54,6 +54,9 @@ class Chef
end
end
+ # 'push' is an alias method to <<
+ alias_method :push, :<<
+
def insert(resource)
is_chef_resource(resource)
if @insert_after_idx
@@ -73,14 +76,6 @@ class Chef
end
end
- def push(*args)
- args.flatten.each do |arg|
- is_chef_resource(arg)
- @resources.push(arg)
- @resources_by_name[arg.to_s] = @resources.length - 1
- end
- end
-
def each
@resources.each do |resource|
yield resource