Class: SdrClient::RedesignedClient::CLI::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/sdr_client/redesigned_client/cli/update.rb

Overview

Update a resource given command-line options

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(druid, **options) ⇒ Update

Returns a new instance of Update.



13
14
15
16
# File 'lib/sdr_client/redesigned_client/cli/update.rb', line 13

def initialize(druid, **options)
  @druid = druid
  @options = options
end

Class Method Details

.run(druid, **options) ⇒ String

Returns job id for the background job result.

Returns:

  • (String)

    job id for the background job result



9
10
11
# File 'lib/sdr_client/redesigned_client/cli/update.rb', line 9

def self.run(druid, **options)
  new(druid, **options).run
end

Instance Method Details

#runString

Returns job id for the background job result.

Returns:

  • (String)

    job id for the background job result



19
20
21
# File 'lib/sdr_client/redesigned_client/cli/update.rb', line 19

def run
  client.update_model(model: updated_cocina_object)
end