class AppConfig::Storage::YAML
YAML storage method.
Constants
- DEFAULT_PATH
Public Class Methods
new(path = DEFAULT_PATH)
click to toggle source
Loads `@data` with the YAML file located at `path`. `@data` will be the OpenStruct that is accessed with `AppConfig.some_var`.
Defaults to `Dir.home/.app_config.yml`
# File lib/app_config/storage/yaml.rb, line 15 def initialize(path = DEFAULT_PATH) # Allows passing `true` as an option. path = DEFAULT_PATH if path == true # Make sure to use the top-level YAML module here. @data = Storage::ConfigData.new(::YAML.load_file(path)) end