Class: Hyrax::Ingest::Ingester::WorkIngester
- Inherits:
-
ActiveFedoraBaseIngester
- Object
- Base
- ActiveFedoraBaseIngester
- Hyrax::Ingest::Ingester::WorkIngester
- Defined in:
- lib/hyrax/ingest/ingester/work_ingester.rb
Instance Attribute Summary collapse
-
#file_sets_config ⇒ Object
readonly
Returns the value of attribute file_sets_config.
Attributes inherited from ActiveFedoraBaseIngester
#af_model_class_name, #properties_config, #shared_sip, #update_params
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ WorkIngester
constructor
A new instance of WorkIngester.
- #run! ⇒ Object
Methods inherited from ActiveFedoraBaseIngester
Methods included from HasDepositor
Methods included from HasLogger
Methods included from HasReport
Methods included from HasIteration
Methods included from HasSharedSIP
Methods included from HasSIP
Constructor Details
#initialize(config = {}) ⇒ WorkIngester
Returns a new instance of WorkIngester.
10 11 12 13 14 15 |
# File 'lib/hyrax/ingest/ingester/work_ingester.rb', line 10 def initialize(config={}) # TODO: Throw a useful custom error when :type option is missing. config[:af_model_class_name] ||= config.delete(:type) @file_sets_config = config.delete(:FileSets) || [] super(config) end |
Instance Attribute Details
#file_sets_config ⇒ Object (readonly)
Returns the value of attribute file_sets_config.
8 9 10 |
# File 'lib/hyrax/ingest/ingester/work_ingester.rb', line 8 def file_sets_config @file_sets_config end |
Instance Method Details
#run! ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/hyrax/ingest/ingester/work_ingester.rb', line 17 def run! assign_properties! save_model! assign_file_sets_to_work! # return the new instance of the ActiveFedora model af_model end |