Class: SdrClient::RedesignedClient::Find
- Inherits:
-
Object
- Object
- SdrClient::RedesignedClient::Find
- Defined in:
- lib/sdr_client/redesigned_client/find.rb
Overview
Find an object
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(object_id:) ⇒ Find
constructor
A new instance of Find.
-
#run ⇒ String
JSON for the given Cocina object or an error.
Constructor Details
#initialize(object_id:) ⇒ Find
Returns a new instance of Find.
14 15 16 |
# File 'lib/sdr_client/redesigned_client/find.rb', line 14 def initialize(object_id:) @object_id = object_id end |
Class Method Details
.run ⇒ Object
9 10 11 |
# File 'lib/sdr_client/redesigned_client/find.rb', line 9 def self.run(...) new(...).run end |
Instance Method Details
#run ⇒ String
Returns JSON for the given Cocina object or an error.
20 21 22 23 |
# File 'lib/sdr_client/redesigned_client/find.rb', line 20 def run logger.info("Retrieving metadata from: #{path}") client.get(path: path) end |