Method: Qonfig::Loaders::Basic.load_file
- Defined in:
- lib/qonfig/loaders/basic.rb
.load_file(file_path, fail_on_unexist: true) ⇒ Object
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.
33 34 35 36 37 |
# File 'lib/qonfig/loaders/basic.rb', line 33 def load_file(file_path, fail_on_unexist: true) load(::File.read(file_path)) rescue Errno::ENOENT => error fail_on_unexist ? (raise Qonfig::FileNotFoundError, error.) : load_empty_data end |