Class: Stash::Merritt::SubmissionPackage::MerrittDataciteBuilder

Inherits:
Repo::FileBuilder
  • Object
show all
Defined in:
lib/stash/merritt/submission_package/merritt_datacite_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(factory) ⇒ MerrittDataciteBuilder

Returns a new instance of MerrittDataciteBuilder.

Parameters:

  • factory (DataciteXMLFactory)

    the Datacite XML factory



11
12
13
14
# File 'lib/stash/merritt/submission_package/merritt_datacite_builder.rb', line 11

def initialize(factory)
  super(file_name: 'mrt-datacite.xml')
  @factory = factory
end

Instance Attribute Details

#factoryObject (readonly)

Returns the value of attribute factory.



8
9
10
# File 'lib/stash/merritt/submission_package/merritt_datacite_builder.rb', line 8

def factory
  @factory
end

Instance Method Details

#contentsObject



16
17
18
# File 'lib/stash/merritt/submission_package/merritt_datacite_builder.rb', line 16

def contents
  factory.build_datacite_xml(datacite_3: true)
end