Method: Appsignal::Config#initialize

Defined in:
lib/appsignal/config.rb

#initialize(root_path, env, load_yaml_file: true) ⇒ Config (private)

Initialize a new AppSignal configuration object.

Parameters:

  • root_path (String)

    Path to the root of the application.

  • env (String)

    The environment to load when AppSignal is started. It will look for an environment with this name in the config/appsignal.yml config file.

  • load_yaml_file (Boolean) (defaults to: true)

    Whether to load configuration from the YAML config file. Defaults to true.

See Also:



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/appsignal/config.rb', line 260

def initialize(
  root_path,
  env,
  load_yaml_file: true
)
  @load_yaml_file = load_yaml_file
  @root_path = root_path.to_s
  @yml_config_file_error = false
  @yml_config_file = yml_config_file
  @valid = false

  @env = env.to_s
  @config_hash = {}
  @system_config = {}
  @loaders_config = {}
  @initial_config = {}
  @file_config = {}
  @env_config = {}
  @override_config = {}
  @dsl_config = {} # Can be set using `Appsignal.configure`

  load_config
end