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.



430
431
432
# File 'lib/appsignal/config.rb', line 430

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.



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

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.



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

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)


525
526
527
528
529
# File 'lib/appsignal/config.rb', line 525

def yml_config_file?
  return false unless yml_config_file

  File.exist?(yml_config_file)
end