Class: Zizia::HyraxDeleteFilesUpdater

Inherits:
HyraxMetadataOnlyUpdater show all
Defined in:
lib/zizia/hyrax/hyrax_delete_files_updater.rb

Instance Attribute Summary collapse

Attributes inherited from HyraxMetadataOnlyUpdater

#based_near_attributes, #csv_import_detail, #depositor, #existing_record, #update_record

Instance Method Summary collapse

Methods inherited from HyraxMetadataOnlyUpdater

#create_actor_env, #failed, #initialize, #started, #succeeded

Constructor Details

This class inherits a constructor from Zizia::HyraxMetadataOnlyUpdater

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



4
5
6
# File 'lib/zizia/hyrax/hyrax_delete_files_updater.rb', line 4

def attrs
  @attrs
end

Instance Method Details

#actor_stackObject



6
7
8
9
# File 'lib/zizia/hyrax/hyrax_delete_files_updater.rb', line 6

def actor_stack
  terminator = Hyrax::Actors::Terminator.new
  Hyrax::DefaultMiddlewareStack.build_stack.build(terminator)
end

#updateObject



11
12
13
14
# File 'lib/zizia/hyrax/hyrax_delete_files_updater.rb', line 11

def update
  existing_record.file_sets.map(&:destroy)
  super
end