Method: Atatus::Config#initialize
- Defined in:
- lib/atatus/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 Metrics/LineLength, Layout/ExtraSpacing
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/atatus/config.rb', line 105 def initialize( = {}) = 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? self.logger ||= build_logger @__view_paths ||= [] @__root_path ||= Dir.pwd end |