Sha256: 8c1e7afe88366200b1aff300266517277730a7af2817bf4302d14782e09f1657
Contents?: true
Size: 846 Bytes
Versions: 2
Compression:
Stored size: 846 Bytes
Contents
# YAML-load_first ## Installation Add this line to your application's Gemfile: ```ruby # note that the case is important gem 'YAML-load_first' ``` require like this (or use `Bundle.require`): ```ruby require 'yaml/load_first' ``` ## Usage `YAML-load_first` works in the same way as `YAML.load_file`, but it takes an array of files, and will load the first one that exists. This can be used to load config files, looking at a number of locations until a matching one is found. ### Example ```ruby require 'yaml/load_first' # the first matching file will be loaded as the config CONFIG = YAML.load_first_file [ "#{ENV['HOME']}/config/app.config", "./config/prod.config", "./config/dev.config" ] ``` ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
YAML-load_first-1.1.4 | README.md |
YAML-load_first-1.1.3 | README.md |