Module: EBPS::Conversion::DeFachinfoYaml

Defined in:
lib/ebps/conversion/de_fachinfo_yaml.rb

Class Method Summary collapse

Class Method Details

.import(string_or_io, path = nil) ⇒ Object



75
76
77
78
79
80
81
82
83
84
# File 'lib/ebps/conversion/de_fachinfo_yaml.rb', line 75

def self.import string_or_io, path=nil
  collection = {}
  YAML.each_document string_or_io do |doc|
    if doc
      collection.store Digest::MD5.hexdigest(doc.to_s), doc
    end
  end
  ## apparently we have some nil-values here (?)
  collection.values.compact
end