Method: ElasticAPM::Config#initialize
- Defined in:
- lib/elastic_apm/config.rb
#initialize(options = {}) {|_self| ... } ⇒ Config
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.
rubocop:enable Layout/LineLength, Layout/ExtraSpacing
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/elastic_apm/config.rb', line 115 def initialize( = {}) @options = load_schema assign() # Pick out config_file specifically as we need it now to load it, # but still need the other env vars to have precedence env = load_env if (env_config_file = env.delete(:config_file)) self.config_file = env_config_file end assign(load_config_file) assign(env) yield self if block_given? if self.logger.nil? || self.log_path self.logger = build_logger end @__view_paths ||= [] @__root_path ||= Dir.pwd end |