Class: Stash::Merritt::EzidHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/stash/merritt/ezid_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource:) ⇒ EzidHelper

Returns a new instance of EzidHelper.



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

def initialize(resource:)
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



6
7
8
# File 'lib/stash/merritt/ezid_helper.rb', line 6

def resource
  @resource
end

Instance Method Details

#mint_idString

Returns the identifier (DOI, ARK, or URN).

Returns:

  • (String)

    the identifier (DOI, ARK, or URN)



13
14
15
# File 'lib/stash/merritt/ezid_helper.rb', line 13

def mint_id
  ezid_client.mint_id
end

#update_metadata(dc3_xml:, landing_page_url:) ⇒ Object



17
18
19
20
# File 'lib/stash/merritt/ezid_helper.rb', line 17

def (dc3_xml:, landing_page_url:)
  identifier_str = resource.identifier_str
  ezid_client.(identifier_str, dc3_xml, landing_page_url)
end