Class: Appsignal::Config::Context Private

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

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

Constant Summary collapse

DSL_FILENAME =

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

"config/appsignal.rb"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env: nil, root_path: nil) ⇒ Context

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 a new instance of Context.



74
75
76
77
# File 'lib/appsignal/config.rb', line 74

def initialize(env: nil, root_path: nil)
  @env = env
  @root_path = root_path
end

Instance Attribute Details

#envObject (readonly)

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.



72
73
74
# File 'lib/appsignal/config.rb', line 72

def env
  @env
end

#root_pathObject (readonly)

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.



72
73
74
# File 'lib/appsignal/config.rb', line 72

def root_path
  @root_path
end

Instance Method Details

#dsl_config_fileObject

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.



79
80
81
# File 'lib/appsignal/config.rb', line 79

def dsl_config_file
  File.join(root_path, DSL_FILENAME)
end

#dsl_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)


83
84
85
# File 'lib/appsignal/config.rb', line 83

def dsl_config_file?
  File.exist?(dsl_config_file)
end