Sha256: 86578f9d8221151b4d9335a68e912d2c70da0626bb84d0a81b450a9ea3e70d89

Contents?: true

Size: 258 Bytes

Versions: 2

Compression:

Stored size: 258 Bytes

Contents

require 'yaml'
require "YAML/load_first/version"

module YAML
	def self.load_first_file(files)
		files = [files] unless files.is_a? Array

		files.each do |file|
			return load_file(file) if File.exist? file
		end

		raise 'Could not load any file'
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
YAML-load_first-1.1.3 lib/yaml/load_first.rb
YAML-load_first-1.1.2 lib/YAML/load_first.rb