Module: Proteus::Config
- Included in:
- BackendInfo
- Defined in:
- lib/proteus/config/config.rb
Defined Under Namespace
Classes: ConfigValidator
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/proteus/config/config.rb', line 3 def config unless @config @config = YAML.load(File.read(File.(config_path))).with_indifferent_access begin validator = ConfigValidator.new(@config) rescue Proteus::Validators::ValidationError => validation_error say "ConfigValidator: #{validation_error.} [#{config_path}] #{"\u2718".encode('utf-8')}", :red exit 1 end end @config end |