summaryrefslogtreecommitdiff
path: root/lib/chef/resource_collection
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-02-13 09:52:10 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-02-13 09:52:10 -0800
commit404a9bc88be538769c6c80b3b31f39a6582991d2 (patch)
tree2f8795e5f64153440c22a522d669c235a627f289 /lib/chef/resource_collection
parentb949a48acc21d4b64869bd7b834708d5232b1f2a (diff)
downloadchef-404a9bc88be538769c6c80b3b31f39a6582991d2.tar.gz
fix specs: RedundantReturn, RedundantSelf, RedundantBegin
department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource_collection')
-rw-r--r--lib/chef/resource_collection/resource_collection_serialization.rb6
-rw-r--r--lib/chef/resource_collection/resource_set.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/resource_collection/resource_collection_serialization.rb b/lib/chef/resource_collection/resource_collection_serialization.rb
index 0e76296a4a..647d28dfd0 100644
--- a/lib/chef/resource_collection/resource_collection_serialization.rb
+++ b/lib/chef/resource_collection/resource_collection_serialization.rb
@@ -21,8 +21,8 @@ class Chef
# Serialize this object as a hash
def to_hash
instance_vars = Hash.new
- self.instance_variables.each do |iv|
- instance_vars[iv] = self.instance_variable_get(iv)
+ instance_variables.each do |iv|
+ instance_vars[iv] = instance_variable_get(iv)
end
{
"json_class" => self.class.name,
@@ -40,7 +40,7 @@ class Chef
module ClassMethods
def json_create(o)
- collection = self.new()
+ collection = new()
o["instance_vars"].each do |k, v|
collection.instance_variable_set(k.to_sym, v)
end
diff --git a/lib/chef/resource_collection/resource_set.rb b/lib/chef/resource_collection/resource_set.rb
index 99be025cd5..1a73818790 100644
--- a/lib/chef/resource_collection/resource_set.rb
+++ b/lib/chef/resource_collection/resource_set.rb
@@ -146,7 +146,7 @@ class Chef
results << lookup(create_key(resource_type, instance_name))
end
end
- return results
+ results
end
def find_resource_by_string(arg)
@@ -166,7 +166,7 @@ class Chef
else
raise ArgumentError, "Bad string format #{arg}, you must have a string like resource_type[name]!"
end
- return results
+ results
end
end
end