Sha256: eff50ab8c415d3462fa71300c7dca3500d4b8ac1233bb4a6027db4b89b76df36

Contents?: true

Size: 418 Bytes

Versions: 6

Compression:

Stored size: 418 Bytes

Contents

module RelatonIso
  module HashConverter
    include RelatonIsoBib::HashConverter
    extend self

    def create_docid(**args)
      begin
        args[:id] = Pubid::Iso::Identifier.parse args[:id] if args[:id].is_a?(String) && args[:primary]
      rescue StandardError
        Util.warn "Unable to create a Pubid::Iso::Identifier from `#{args[:id]}`"
      end
      DocumentIdentifier.new(**args)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
relaton-iso-1.20.0 lib/relaton_iso/hash_converter.rb
relaton-iso-1.19.2 lib/relaton_iso/hash_converter.rb
relaton-iso-1.19.1 lib/relaton_iso/hash_converter.rb
relaton-iso-1.19.0 lib/relaton_iso/hash_converter.rb
relaton-iso-1.18.4 lib/relaton_iso/hash_converter.rb
relaton-iso-1.18.2 lib/relaton_iso/hash_converter.rb