Class: Ddr::IngestTools::ManifestArkMinter::ManifestUpdater
- Inherits:
-
Object
- Object
- Ddr::IngestTools::ManifestArkMinter::ManifestUpdater
- Defined in:
- lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb
Constant Summary collapse
- DEFAULT_CONFIG_FILE =
'manifest_ark_minter_config.yml'
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#manifest ⇒ Object
readonly
Returns the value of attribute manifest.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config: DEFAULT_CONFIG_FILE, manifest:, output:, logger: nil) ⇒ ManifestUpdater
constructor
A new instance of ManifestUpdater.
Constructor Details
#initialize(config: DEFAULT_CONFIG_FILE, manifest:, output:, logger: nil) ⇒ ManifestUpdater
Returns a new instance of ManifestUpdater.
12 13 14 15 16 17 |
# File 'lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb', line 12 def initialize(config: DEFAULT_CONFIG_FILE, manifest:, output:, logger: nil) @config = config @manifest = manifest @output = output @logger = logger || Logger.new(STDOUT) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb', line 8 def config @config end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
8 9 10 |
# File 'lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb', line 8 def logger @logger end |
#manifest ⇒ Object (readonly)
Returns the value of attribute manifest.
8 9 10 |
# File 'lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb', line 8 def manifest @manifest end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
8 9 10 |
# File 'lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb', line 8 def output @output end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/ddr/ingesttools/manifest_ark_minter/manifest_updater.rb', line 19 def call configure if needs_updating? update else logger.info("Manifest file already has ARKs ... nothing to mint") end end |