class Hashie::Mash
def self.load(path, options = {})
def self.load(path, options = {}) @_mashes ||= new return @_mashes[path] if @_mashes.key?(path) fail ArgumentError, "The following file doesn't exist: #{path}" unless File.file?(path) parser = options.fetch(:parser) { Hashie::Extensions::Parsers::YamlErbParser } @_mashes[path] = new(parser.perform(path)).freeze end