Sha256: 4e399953d006816a67b63ee391cecec9f8ba857815b3612ff289d970981170e2

Contents?: true

Size: 497 Bytes

Versions: 5

Compression:

Stored size: 497 Bytes

Contents

module RelatonBib
  # Document identifier.
  class DocumentIdentifier
    # @return [String]
    attr_reader :id

    # @return [String, NilClass]
    attr_reader :type

    # @param id [String]
    # @param type [String, NilClass]
    def initialize(id:, type: nil)
      @id   = id
      @type = type
    end

    #
    # Add docidentifier xml element
    #
    # @param [Nokogiri::XML::Builder] builder
    #
    def to_xml(builder)
      builder.docidentifier(id, type: type)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
relaton-bib-0.1.5 lib/relaton_bib/document_identifier.rb
relaton-bib-0.1.3 lib/relaton_bib/document_identifier.rb
relaton-bib-0.1.2 lib/relaton_bib/document_identifier.rb
relaton-bib-0.1.1 lib/relaton_bib/document_identifier.rb
relaton-bib-0.1.0 lib/relaton_bib/document_identifier.rb