Sha256: e0de0da054d26d8ef67480ce2e9ea5df08efe9902daa807b436cdc02d83b79eb

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 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
        fail "There was an error loading data from #{file}."
      end
      input_data
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppet-2.7.26 ext/packaging/lib/packaging/util/serialization.rb