Class: Puree::Person
Overview
Person resource
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#affiliation ⇒ Array<Hash>
Affiliation.
-
#email ⇒ Array
Email.
-
#image ⇒ Array<String>
Image URL.
-
#initialize(base_url: nil, username: nil, password: nil, basic_auth: nil) ⇒ Person
constructor
A new instance of Person.
-
#keyword ⇒ Array<String>
Keyword.
-
#metadata ⇒ Hash
All metadata.
-
#name ⇒ Hash
Name.
-
#orcid ⇒ String
ORCID.
Methods inherited from Resource
#created, #get, #locale, #modified, #set_content, #uuid
Constructor Details
#initialize(base_url: nil, username: nil, password: nil, basic_auth: nil) ⇒ Person
Returns a new instance of Person.
11 12 13 14 15 16 17 |
# File 'lib/puree/person.rb', line 11 def initialize(base_url: nil, username: nil, password: nil, basic_auth: nil) super(api: :person, base_url: base_url, username: username, password: password, basic_auth: basic_auth) end |
Instance Method Details
#affiliation ⇒ Array<Hash>
Affiliation
22 23 24 |
# File 'lib/puree/person.rb', line 22 def affiliation @metadata['affiliation'] end |
#email ⇒ Array
29 30 31 |
# File 'lib/puree/person.rb', line 29 def email @metadata['email'] end |
#image ⇒ Array<String>
Image URL
36 37 38 |
# File 'lib/puree/person.rb', line 36 def image @metadata['image'] end |
#keyword ⇒ Array<String>
Keyword
43 44 45 |
# File 'lib/puree/person.rb', line 43 def keyword @metadata['keyword'] end |
#metadata ⇒ Hash
All metadata
64 65 66 |
# File 'lib/puree/person.rb', line 64 def @metadata end |
#name ⇒ Hash
Name
50 51 52 |
# File 'lib/puree/person.rb', line 50 def name @metadata['name'] end |
#orcid ⇒ String
ORCID
57 58 59 |
# File 'lib/puree/person.rb', line 57 def orcid @metadata['orcid'] end |