Class: Taleo::Activity
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
#can_download? ⇒ Boolean
18
19
20
|
# File 'lib/taleo/activity.rb', line 18
def can_download?
relationship_urls.key?('formDownloadUrl')
end
|
#download ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/taleo/activity.rb', line 22
def download
unless can_download?
raise Error.new("Activity #{id} is not available for download")
end
client.download(relationship_urls.fetch('formDownloadUrl'))
end
|
#employee_id ⇒ Object
14
15
16
|
# File 'lib/taleo/activity.rb', line 14
def employee_id
data.fetch('activityEmployee')
end
|
#id ⇒ Object
10
11
12
|
# File 'lib/taleo/activity.rb', line 10
def id
data.fetch('id')
end
|