Module: RelatonBib::PersonIdentifierType

Defined in:
lib/relaton_bib/person.rb

Overview

Person identifier type.

Constant Summary collapse

ISNI =
"isni"
URI =
"uri"

Class Method Summary collapse

Class Method Details

.check(type) ⇒ Object

Checks type.

Parameters:

  • type (String)

Raises:

  • (ArgumentError)

    if type isn’t “isni” or “uri”



101
102
103
104
105
# File 'lib/relaton_bib/person.rb', line 101

def self.check(type)
  unless [ISNI, URI].include? type
    raise ArgumentError, 'Invalid type. It should be "isni" or "uri".'
  end
end