Class | AppConfig::Storage::YAML |
In: |
lib/app_config/storage/yaml.rb
|
Parent: | Storage::Base |
DEFAULTS | = | { :path => File.expand_path(File.join(ENV['HOME'], '.app_config.yml')) |
Loads @data with the YAML file located at path. @data will be the Hashish that is accessed with AppConfig[:key].
Defaults to $HOME/.app_config.yml
# File lib/app_config/storage/yaml.rb, line 17 def initialize(options) super(DEFAULTS.merge(options)) path = @options[:path] || DEFAULTS[:path] # Make sure to use the top-level YAML module here. @data = Hashish.new(::YAML.load_file(path)) end