Sha256: 4dbe4c8b41458a9100e3657725b2ab08ac046f15d24b6011526f2b675d14c984
Contents?: true
Size: 325 Bytes
Versions: 8
Compression:
Stored size: 325 Bytes
Contents
require "yaml" require "erb" class EasySettings::YamlSource attr_reader :path def initialize(path) @path = path.to_s end def load result = File.exist?(path) ? YAML.load(ERB.new(IO.read(path)).result) : {} rescue StandardError => e raise "Error occurred while parsing #{path}: #{e.message}" end end
Version data entries
8 entries across 8 versions & 1 rubygems