class PostDB::Configuration
Public Class Methods
[](name)
click to toggle source
Get a value from the configuration
Arguments:
name: (String)
Example:
>> PostDB::Configuration[:database] => { ... }
# File lib/postdb/configuration.rb, line 28 def [](name) return nil unless @configuration @configuration[name] end
load_file(path)
click to toggle source
Load the configuration from a file
Arguments:
path: (String) The path to the configuration file
Example:
>> PostDB::Configuration.load_file(path) => true
# File lib/postdb/configuration.rb, line 13 def load_file(path) @configuration = YAML.load(File.read(path)) true end