Class: Hyrax::Ingest::Configuration
- Inherits:
-
Object
- Object
- Hyrax::Ingest::Configuration
- Defined in:
- lib/hyrax/ingest/configuration.rb
Instance Attribute Summary collapse
-
#config_file_path ⇒ Object
readonly
Returns the value of attribute config_file_path.
Instance Method Summary collapse
-
#ingester_configs ⇒ Array
Array of hashes, where each hash is the configuration options for an Ingester instance.
-
#initialize(config_file_path:) ⇒ Configuration
constructor
A new instance of Configuration.
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_path ⇒ Object (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_configs ⇒ Array
Returns 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 |