Method: PDK::Config#initialize

Defined in:
lib/pdk/config.rb

#initialize(options = nil) ⇒ Config

Create a new instance of the PDK Configuration

Parameters:

  • options (Hash[String => Object]) (defaults to: nil)

    Optional hash to override configuration options

Options Hash (options):

  • 'system.path' (String)

    Path to the system PDK configuration file

  • 'system.module_defaults.path' (String)

    Path to the system module answers PDK configuration file

  • 'user.path' (String)

    Path to the user PDK configuration file

  • 'user.module_defaults.path' (String)

    Path to the user module answers PDK configuration file

  • 'context' (PDK::Context::AbstractContext)

    The context that the configuration should be created in



23
24
25
26
27
28
29
30
31
32
# File 'lib/pdk/config.rb', line 23

def initialize(options = nil)
  options = {} if options.nil?
  @config_options = {
    'system.path' => PDK::Config.system_config_path,
    'system.module_defaults.path' => PDK::Config.system_answers_path,
    'user.path' => PDK::Config.user_config_path,
    'user.module_defaults.path' => PDK::AnswerFile.default_answer_file_path,
    'context' => PDK.context
  }.merge(options)
end