Class: Taleo::Candidate
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
Methods inherited from Resource
has_many, has_one, #initialize, #related_resource, #related_resources, #relationship_urls
Instance Method Details
#employee_id ⇒ Object
15
16
17
|
# File 'lib/taleo/candidate.rb', line 15
def employee_id
data.fetch('employee')
end
|
#has_resume? ⇒ Boolean
19
20
21
|
# File 'lib/taleo/candidate.rb', line 19
def has_resume?
relationship_urls.key?('resume')
end
|
#id ⇒ Object
11
12
13
|
# File 'lib/taleo/candidate.rb', line 11
def id
data.fetch('candId')
end
|
#resume ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/taleo/candidate.rb', line 23
def resume
unless has_resume?
raise Error.new("Candidate #{id} has no resume available for download")
end
client.download(relationship_urls.fetch('resume'))
end
|