Sha256: 6a4aee81d009f8042accb172534dc62d829c258d5ceb3ee8d9141eea3c90abc1
Contents?: true
Size: 482 Bytes
Versions: 93
Compression:
Stored size: 482 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 => e fail "There was an error loading data from #{file}.\n#{e}" end input_data end end end
Version data entries
93 entries across 93 versions & 1 rubygems