Class: SdrClient::RedesignedClient::Metadata
- Inherits:
-
Object
- Object
- SdrClient::RedesignedClient::Metadata
- Defined in:
- lib/sdr_client/redesigned_client/metadata.rb
Overview
Build an object and then deposit it
Class Method Summary collapse
Instance Method Summary collapse
-
#deposit ⇒ Object
rubocop:disable Metrics/MethodLength.
-
#initialize(apo:, basepath:, source_id:, **options) ⇒ Metadata
constructor
A new instance of Metadata.
Constructor Details
#initialize(apo:, basepath:, source_id:, **options) ⇒ Metadata
Returns a new instance of Metadata.
17 18 19 20 21 22 |
# File 'lib/sdr_client/redesigned_client/metadata.rb', line 17 def initialize(apo:, basepath:, source_id:, **) @apo = apo @basepath = basepath @source_id = source_id @options = end |
Class Method Details
.deposit ⇒ Object
7 8 9 |
# File 'lib/sdr_client/redesigned_client/metadata.rb', line 7 def self.deposit(...) new(...).deposit end |
Instance Method Details
#deposit ⇒ Object
rubocop:disable Metrics/MethodLength
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/sdr_client/redesigned_client/metadata.rb', line 24 def deposit # rubocop:disable Metrics/MethodLength = SdrClient::RedesignedClient::StructuralMetadataBuilder.build( files: files, files_metadata: , basepath: basepath ) request_builder = SdrClient::RedesignedClient::RequestBuilder.new( apo: apo, source_id: source_id, files_metadata: , ** ) client.deposit_model( model: request_builder.to_cocina, basepath: basepath, files: files, accession: accession, request_builder: request_builder, ** ) end |