Class: Merritt::Manifest::Object

Inherits:
Merritt::Manifest show all
Defined in:
lib/merritt/manifest/object.rb

Overview

A specialization of Merritt::Manifest for Merritt object submissions.

Constant Summary

Constants inherited from Merritt::Manifest

CHECKM_0_7, COPYRIGHT, NAME, PROFILE_BASE_URI, VERSION

Instance Attribute Summary

Attributes inherited from Merritt::Manifest

#conformance, #entries, #fields, #prefixes, #profile

Instance Method Summary collapse

Methods inherited from Merritt::Manifest

#write_to, #write_to_string

Constructor Details

#initialize(files:) ⇒ Object

Parameters:

  • files (Array<Manifest::File>)

    an array of data files to be converted to entries. (Note that these not be actual File objects so long as they respond to, at minimum, #file_url. The other File fields are optional.)



10
11
12
13
14
15
16
17
# File 'lib/merritt/manifest/object.rb', line 10

def initialize(files:)
  super(
    profile: 'http://uc3.cdlib.org/registry/ingest/manifest/mrt-ingest-manifest',
    prefixes: Merritt::Manifest::Fields::Object.prefixes,
    fields: Merritt::Manifest::Fields::Object.fields,
    entries: to_entries(files)
  )
end