Method: Jazzy::Config#read_config_file
- Defined in:
- lib/jazzy/config.rb
#read_config_file(file) ⇒ Object
622 623 624 625 626 627 628 629 630 |
# File 'lib/jazzy/config.rb', line 622 def read_config_file(file) case File.extname(file) when '.json' JSON.parse(File.read(file)) when '.yaml', '.yml' YAML.safe_load(File.read(file)) else raise "Config file must be .yaml or .json, but got #{file.inspect}" end end |