Class: Taleo::Candidate

Inherits:
Resource show all
Defined in:
lib/taleo/candidate.rb

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

Constructor Details

This class inherits a constructor from Taleo::Resource

Instance Method Details

#employee_idObject



15
16
17
# File 'lib/taleo/candidate.rb', line 15

def employee_id
  data.fetch('employee')
end

#has_resume?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/taleo/candidate.rb', line 19

def has_resume?
  relationship_urls.key?('resume')
end

#idObject



11
12
13
# File 'lib/taleo/candidate.rb', line 11

def id
  data.fetch('candId')
end

#resumeObject



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