Class: Stash::Merritt::EzidHelper
- Inherits:
-
Object
- Object
- Stash::Merritt::EzidHelper
- Defined in:
- lib/stash/merritt/ezid_helper.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource:) ⇒ EzidHelper
constructor
A new instance of EzidHelper.
-
#mint_id ⇒ String
The identifier (DOI, ARK, or URN).
- #update_metadata(dc3_xml:, landing_page_url:) ⇒ Object
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
#resource ⇒ Object (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_id ⇒ String
Returns 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 |