Sha256: 5964b27d4228b03630eccc4c1e51635fbf330a651859dd13a6752136513e965e

Contents?: true

Size: 456 Bytes

Versions: 9

Compression:

Stored size: 456 Bytes

Contents

module Ddr
  module Models
    module HasEzidIdentifier

      protected


      def create_identifier
        create_ezid
      end

      private

      def create_ezid
        metadata = Ddr::Metadata::Ezid.new(self)
        ezid_identifier = Ezid::Identifier.create(metadata)
        Ddr::Metadata::PermanentIdentifier.new(ezid_identifier.id)
      end

      def get_ezid
        Ezid::Identifier.find(permanent_id.value)
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ddr-models-1.13.1 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.13.0 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.11.4 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.11.3 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.11.2 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.9.0 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.8.1 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.8.0 lib/ddr/models/#has_ezid_identifier.rb#
ddr-models-1.6.0 lib/ddr/models/#has_ezid_identifier.rb#