lib/dor/services/client.rb in dor-services-client-1.1.0 vs lib/dor/services/client.rb in dor-services-client-1.1.1
- old
+ new
@@ -35,12 +35,12 @@
raise ArgumentError, '`object_identifier` argument cannot be `nil` in call to `#object(object_identifier)' if object_identifier.nil?
# Return memoized object instance if object identifier value is the same
# This allows us to test the client more easily in downstream codebases,
# opening up stubbing without requiring `any_instance_of`
- return @object if @object&.object_id == object_identifier
+ return @object if @object&.object_identifier == object_identifier
- @object = Object.new(connection: connection, version: DEFAULT_VERSION, object_id: object_identifier)
+ @object = Object.new(connection: connection, version: DEFAULT_VERSION, object_identifier: object_identifier)
end
# @return [Dor::Services::Client::Objects] an instance of the `Client::Objects` class
def objects
@objects ||= Objects.new(connection: connection, version: DEFAULT_VERSION)