Skip to content

Commit

Permalink
Switch more operands to test for undefined attr
Browse files Browse the repository at this point in the history
I missed these in #40
  • Loading branch information
bjeanes committed Aug 3, 2018
1 parent e1bf433 commit 72061ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dry/initializer/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def public_attributes(instance)
key = item.target
next unless instance.respond_to? key
val = instance.send(key)
obj[key] = val unless val == null
obj[key] = val unless null == val
end
end

Expand All @@ -90,7 +90,7 @@ def attributes(instance)
definitions.values.each_with_object({}) do |item, obj|
key = item.target
val = instance.send(:instance_variable_get, item.ivar)
obj[key] = val unless val == null
obj[key] = val unless null == val
end
end

Expand Down

0 comments on commit 72061ff

Please sign in to comment.