lib/ezid/identifier.rb in ezid-client-0.4.2 vs lib/ezid/identifier.rb in ezid-client-0.5.0
- old
+ new
@@ -1,14 +1,20 @@
+require "forwardable"
+
module Ezid
#
# Represents an EZID identifier as a resource.
#
# @api public
#
class Identifier
+ extend Forwardable
attr_reader :id, :client
attr_accessor :shoulder, :metadata
+
+ def_delegators :metadata, *(Metadata.elements.readers)
+ def_delegators :metadata, *(Metadata.elements.writers)
# Attributes to display on inspect
INSPECT_ATTRS = %w( id status target created )
# EZID status terms