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

Version Path
packaging-0.122.3 lib/packaging/util/serialization.rb
packaging-0.122.2 lib/packaging/util/serialization.rb
packaging-0.122.1 lib/packaging/util/serialization.rb
packaging-0.122.0 lib/packaging/util/serialization.rb
packaging-0.121.0 lib/packaging/util/serialization.rb
packaging-0.120.0 lib/packaging/util/serialization.rb
packaging-0.118.0 lib/packaging/util/serialization.rb
packaging-0.117.0 lib/packaging/util/serialization.rb
packaging-0.116.0 lib/packaging/util/serialization.rb
packaging-0.115.0 lib/packaging/util/serialization.rb
packaging-0.114.0 lib/packaging/util/serialization.rb
packaging-0.113.0 lib/packaging/util/serialization.rb
packaging-0.112.0 lib/packaging/util/serialization.rb
packaging-0.111.0 lib/packaging/util/serialization.rb
packaging-0.110.1 lib/packaging/util/serialization.rb
packaging-0.110.0 lib/packaging/util/serialization.rb
packaging-0.109.7 lib/packaging/util/serialization.rb
packaging-0.109.6 lib/packaging/util/serialization.rb
packaging-0.109.5 lib/packaging/util/serialization.rb
packaging-0.109.4 lib/packaging/util/serialization.rb