Sha256: 1e1a7bf49a1a00e4dcad2612de52b7c34a98a4a69203f835b23855aa0a3e4d71
Contents?: true
Size: 495 Bytes
Versions: 33
Compression:
Stored size: 495 Bytes
Contents
# Utility methods for dealing with serialization of Config params module Pkg::Util::Serialization class << self # Given the path to a yaml file, load the yaml file into an object and return the object. def load_yaml(file) require 'yaml' file = File.expand_path(file) begin input_data = YAML.load_file(file) || {} rescue StandardError => e fail "There was an error loading data from #{file}.\n#{e}" end input_data end end end
Version data entries
33 entries across 33 versions & 1 rubygems