Class: Orcid::Remote::ProfileQueryService::SearchResponse

Inherits:
Object
  • Object
show all
Defined in:
app/services/orcid/remote/profile_query_service/search_response.rb

Overview

A search response against Orcid. This should implement the Questioning Authority query response object interface.

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SearchResponse

Returns a new instance of SearchResponse.



9
10
11
# File 'app/services/orcid/remote/profile_query_service/search_response.rb', line 9

def initialize(attributes = {})
  @attributes = attributes.with_indifferent_access
end

Instance Method Details

#biographyObject



25
26
27
# File 'app/services/orcid/remote/profile_query_service/search_response.rb', line 25

def biography
  @attributes.fetch(:biography)
end

#idObject



13
14
15
# File 'app/services/orcid/remote/profile_query_service/search_response.rb', line 13

def id
  @attributes.fetch(:id)
end

#labelObject



21
22
23
# File 'app/services/orcid/remote/profile_query_service/search_response.rb', line 21

def label
  @attributes.fetch(:label)
end

#orcid_profile_idObject



17
18
19
# File 'app/services/orcid/remote/profile_query_service/search_response.rb', line 17

def orcid_profile_id
  @attributes.fetch(:id)
end