Class: SdrClient::Deposit::UpdateDroWithFileIdentifiers
- Inherits:
-
Object
- Object
- SdrClient::Deposit::UpdateDroWithFileIdentifiers
- Defined in:
- lib/sdr_client/deposit/update_dro_with_file_identifiers.rb
Overview
Updates a DRO so that the structural metadata references the uploaded file ids
Class Method Summary collapse
Class Method Details
.update(request_dro:, upload_responses:) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/sdr_client/deposit/update_dro_with_file_identifiers.rb', line 10 def self.update(request_dro:, upload_responses:) # Manipulating request_dro as hash since immutable structural = request_dro.to_h[:structural] return request_dro.new({}) unless structural signed_ids = signed_id_map(upload_responses) request_dro.new(structural: updated_structural(structural, signed_ids)) end |