Class AppConfig::Storage::YAML
In: lib/app_config/storage/yaml.rb
Parent: Storage::Base

YAML storage method.

Methods

new  

Constants

DEFAULTS = { :path => File.expand_path(File.join(ENV['HOME'], '.app_config.yml'))

Public Class methods

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

[Source]

# 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

[Validate]