Method: LearnLab::Configuration.open
- Defined in:
- lib/learn_lab/configuration.rb
.open(filename = 'enterprise.yml', **options) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/learn_lab/configuration.rb', line 10 def self.open(filename='enterprise.yml', **) fs = .fetch(:fs) { LearnLab.file_system } path = fs.join(fs.home, '.flatiron-school', filename) data = fs.read_yaml_file(path) new(path, data) rescue ConfigurationError path = fs.join(fs.home, '.flatiron-school', 'enterprise.yml') new(path, {}) end |