Class: Hyrax::Ingest::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hyrax/ingest/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_file_path:) ⇒ Configuration

Returns a new instance of Configuration.



9
10
11
12
13
# File 'lib/hyrax/ingest/configuration.rb', line 9

def initialize(config_file_path:)
  @config_file_path = config_file_path.to_s
  raise Hyrax::Ingest::Errors::NoConfigFileFound.new(@config_file_path) unless File.exist? @config_file_path
  validate!
end

Instance Attribute Details

#config_file_pathObject (readonly)

Returns the value of attribute config_file_path.



7
8
9
# File 'lib/hyrax/ingest/configuration.rb', line 7

def config_file_path
  @config_file_path
end

Instance Method Details

#ingester_configsArray

Returns Array of hashes, where each hash is the configuration options for an Ingester instance.

Returns:

  • (Array)

    Array of hashes, where each hash is the configuration options for an Ingester instance



17
18
19
# File 'lib/hyrax/ingest/configuration.rb', line 17

def ingester_configs
  @ingester_configs ||= config[:ingest]
end