Skip to content

Commit

Permalink
fix rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvey committed Nov 5, 2014
1 parent 7c9eb37 commit e5e89f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/lib/vagrant-openstack-provider/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,17 @@ def merge(other)

# Set all of our instance variables on the new class
[self, other].each do |obj|
# rubocop:disable Style/Next
obj.instance_variables.each do |key|
# rubocop:enable Style/Next
# Ignore keys that start with a double underscore. This allows
# configuration classes to still hold around internal state
# that isn't propagated.
if !key.to_s.start_with?("@__")
unless key.to_s.start_with?('@__')
# Don't set the value if it is the unset value, either.
value = obj.instance_variable_get(key)
if [:@networks, :@volumes, :@rsync_includes].include? key
result.instance_variable_set(key, value) if !value.empty?
result.instance_variable_set(key, value) unless value.empty?
else
result.instance_variable_set(key, value) if value != UNSET_VALUE
end
Expand Down

0 comments on commit e5e89f2

Please sign in to comment.