lib/economic/entity/handle.rb in rconomic-0.7.0 vs lib/economic/entity/handle.rb in rconomic-0.7.1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
class Economic::Entity
class Handle
def self.build(options)
return options if options.is_a?(Handle)
return nil if options.nil?
@@ -84,13 +86,15 @@
end
def verify_all_keys_are_known(hash)
if hash.respond_to?(:keys)
unknown_keys = hash.keys - id_properties.keys - id_properties.values
- raise(
- ArgumentError,
- "Unknown keys in handle: #{unknown_keys.inspect}"
- ) unless unknown_keys.empty?
+ unless unknown_keys.empty?
+ raise(
+ ArgumentError,
+ "Unknown keys in handle: #{unknown_keys.inspect}"
+ )
+ end
end
end
# Raises exceptions if hash doesn't contain values we can use to construct a
# new handle