Class: Appsignal::Config

Inherits:
Object show all
Defined in:
lib/appsignal/config.rb

Defined Under Namespace

Classes: ConfigDSL

Instance Method Summary collapse

Instance Method Details

#active?Boolean

Check if AppSignal is active.

Returns:

  • (Boolean)

    True if valid and active for the current environment.



424
425
426
# File 'lib/appsignal/config.rb', line 424

def active?
  valid? && active_for_env?
end

#active_for_env?Boolean

Check if AppSignal is active for the current environment.

Returns:

  • (Boolean)

    True if active for the current environment.



417
418
419
# File 'lib/appsignal/config.rb', line 417

def active_for_env?
  config_hash[:active]
end

#valid?Boolean

Check if the configuration is valid.

Returns:

  • (Boolean)

    True if the configuration is valid, false otherwise.



410
411
412
# File 'lib/appsignal/config.rb', line 410

def valid?
  @valid
end

#yml_config_file?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


519
520
521
522
523
# File 'lib/appsignal/config.rb', line 519

def yml_config_file?
  return false unless yml_config_file

  File.exist?(yml_config_file)
end