Skip to content

Commit 9714111

Browse files
authored
Merge pull request #45 from bjeanes/follow-up-pr-40
Switch operands to test for undefined attributes (again)
2 parents e1bf433 + 72061ff commit 9714111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dry/initializer/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def public_attributes(instance)
7979
key = item.target
8080
next unless instance.respond_to? key
8181
val = instance.send(key)
82-
obj[key] = val unless val == null
82+
obj[key] = val unless null == val
8383
end
8484
end
8585

@@ -90,7 +90,7 @@ def attributes(instance)
9090
definitions.values.each_with_object({}) do |item, obj|
9191
key = item.target
9292
val = instance.send(:instance_variable_get, item.ivar)
93-
obj[key] = val unless val == null
93+
obj[key] = val unless null == val
9494
end
9595
end
9696

0 commit comments

Comments
 (0)