Class: MAuth::ConfigFile
- Inherits:
-
Object
- Object
- MAuth::ConfigFile
- Defined in:
- lib/mauth/client.rb
Constant Summary collapse
- GITHUB_URL =
'https://github.com/mdsol/mauth-client-ruby'.freeze
Class Method Summary collapse
Class Method Details
.load(path) ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mauth/client.rb', line 89 def self.load(path) unless File.exist?(path) raise "File #{path} not found. Please visit #{GITHUB_URL} for details." end @config[path] ||= YAML.load_file(path) unless @config[path] raise "File #{path} does not contain proper YAML information. Visit #{GITHUB_URL} for details." end @config[path] end |