Method: Metanorma::Collection::Manifest#manifest_expand_yaml_entry

Defined in:
lib/metanorma/collection/manifest/manifest.rb

#manifest_expand_yaml_entry(entry, dir) ⇒ Object



116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/metanorma/collection/manifest/manifest.rb', line 116

def manifest_expand_yaml_entry(entry, dir)
  f = @collection.class.resolve_fileref(dir, entry.file)
  currdir = File.dirname(f)
  @collection.class.check_file_existence(f)
  entry.file = nil
  entry.entry = ::Metanorma::Collection::Config::Config.from_yaml(File.read(f)).manifest
  if currdir != dir
    prefix = Pathname.new(currdir).relative_path_from(Pathname.new(dir))
    update_filepaths(entry.entry, prefix.to_s)
  end
  currdir
end