-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keep required researcher_type. datacite/volpino#72
- Loading branch information
Martin Fenner
committed
Sep 30, 2019
1 parent
c10e1f4
commit 24996a8
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class ResearcherType < BaseObject | ||
description "Information about researchers" | ||
|
||
field :id, ID, null: true, description: "ORCID ID" | ||
field :name, String, null: true, description: "Researcher name" | ||
field :name_type, String, null: true, hash_key: "nameType", description: "The type of name" | ||
field :given_names, String, null: true, description: "User given names" | ||
field :family_name, String, null: true, description: "Researcher family name" | ||
|
||
def id | ||
object.uid ? "https://orcid.org/#{object.uid}" : object.id | ||
end | ||
|
||
def name | ||
object.name | ||
end | ||
end |