Sha256: f98495c796ed28d3b33a283e860157124bde3f9a65790eca72681aaa9ce0e351
Contents?: true
Size: 552 Bytes
Versions: 2
Compression:
Stored size: 552 Bytes
Contents
module Munge module Util class Config class << self def read(path) abspath = File.expand_path(path) yaml = read_yaml(abspath) config = if yaml.is_a?(Hash) yaml else {} end Munge::Util::SymbolHash.deep_convert(config) end private def read_yaml(abspath) YAML.load_file(abspath) rescue raise Munge::Errors::ConfigYmlNotFound, abspath end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
munge-0.14.0 | lib/munge/util/config.rb |
munge-0.13.0 | lib/munge/util/config.rb |