Class: SdrClient::Update
- Inherits:
-
Object
- Object
- SdrClient::Update
- Defined in:
- lib/sdr_client/update.rb
Overview
The namespace for the “update” command
Class Method Summary collapse
-
.run(druid, **options) ⇒ String
Job id for the background job result.
Instance Method Summary collapse
-
#initialize(druid, **options) ⇒ Update
constructor
A new instance of Update.
-
#run ⇒ String
Job id for the background job result.
Constructor Details
#initialize(druid, **options) ⇒ Update
Returns a new instance of Update.
11 12 13 14 15 |
# File 'lib/sdr_client/update.rb', line 11 def initialize(druid, **) @druid = druid @url = .fetch(:url) @options = end |
Class Method Details
.run(druid, **options) ⇒ String
Returns job id for the background job result.
7 8 9 |
# File 'lib/sdr_client/update.rb', line 7 def self.run(druid, **) new(druid, **).run end |
Instance Method Details
#run ⇒ String
Returns job id for the background job result.
18 19 20 21 22 23 24 |
# File 'lib/sdr_client/update.rb', line 18 def run SdrClient::Deposit::UpdateResource.run( metadata: updated_cocina_object, logger: [:logger] || Logger.new($stdout), connection: SdrClient::Connection.new(url: url) ) end |