Class: Hyrax::Ingest::Ingester::ActiveFedoraBaseIngester

Inherits:
Base
  • Object
show all
Includes:
Interloper
Defined in:
lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasDepositor

included

Methods included from HasLogger

config, #logger, #logger=

Methods included from HasReport

#report, #report=

Methods included from HasIteration

#iteration, #iteration=

Methods included from HasSharedSIP

#shared_sip=

Methods included from HasSIP

#sip, #sip=

Constructor Details

#initialize(config = {}) ⇒ ActiveFedoraBaseIngester

Returns a new instance of ActiveFedoraBaseIngester.

Raises:

  • (ArgumentError)


28
29
30
31
32
33
34
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 28

def initialize(config={})
  raise ArgumentError, "Option :af_model_class_name is required" unless config.key?(:af_model_class_name)
  @af_model_class_name = config.delete(:af_model_class_name).to_s
  @properties_config = config.delete(:properties) || []
  @update_params = config.delete(:update)
  super(config)
end

Instance Attribute Details

#af_model_class_nameObject (readonly)

Returns the value of attribute af_model_class_name.



14
15
16
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 14

def af_model_class_name
  @af_model_class_name
end

#properties_configObject (readonly)

Returns the value of attribute properties_config.



14
15
16
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 14

def properties_config
  @properties_config
end

#shared_sipObject (readonly)

Returns the value of attribute shared_sip.



14
15
16
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 14

def shared_sip
  @shared_sip
end

#update_paramsObject (readonly)

Returns the value of attribute update_params.



14
15
16
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 14

def update_params
  @update_params
end

Instance Method Details

#af_modelObject



41
42
43
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 41

def af_model
  @af_model ||= new_or_existing_af_model
end

#run!Object



36
37
38
39
# File 'lib/hyrax/ingest/ingester/active_fedora_base_ingester.rb', line 36

def run!
  assign_properties!
  save_model!
end