Class: Appsignal::Config::ConfigDSL Private
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.
Instance Attribute Summary collapse
- #dsl_options ⇒ Object readonly private
Instance Method Summary collapse
- #activate_if_environment(*envs) ⇒ Object private
- #app_path ⇒ Object private
- #env ⇒ Object private
-
#env?(given_env) ⇒ TrueClass, FalseClass
private
Returns true if the given environment name matches the loaded environment name.
-
#initialize(config) ⇒ ConfigDSL
constructor
private
A new instance of ConfigDSL.
Constructor Details
#initialize(config) ⇒ ConfigDSL
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 ConfigDSL.
599 600 601 602 |
# File 'lib/appsignal/config.rb', line 599 def initialize(config) @config = config @dsl_options = {} end |
Instance Attribute Details
#dsl_options ⇒ Object (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.
597 598 599 |
# File 'lib/appsignal/config.rb', line 597 def @dsl_options end |
Instance Method Details
#activate_if_environment(*envs) ⇒ Object
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.
621 622 623 |
# File 'lib/appsignal/config.rb', line 621 def activate_if_environment(*envs) self.active = envs.map(&:to_s).include?(env) end |
#app_path ⇒ Object
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.
604 605 606 |
# File 'lib/appsignal/config.rb', line 604 def app_path @config.root_path end |
#env ⇒ Object
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.
608 609 610 |
# File 'lib/appsignal/config.rb', line 608 def env @config.env end |
#env?(given_env) ⇒ TrueClass, FalseClass
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 true if the given environment name matches the loaded environment name.
617 618 619 |
# File 'lib/appsignal/config.rb', line 617 def env?(given_env) env == given_env.to_s end |