class Taleo::Attachment

Public Instance Methods

can_download?() click to toggle source
# File lib/taleo/attachment.rb, line 19
def can_download?
  data.key?('downloadUrl')
end
content_type() click to toggle source
# File lib/taleo/attachment.rb, line 15
def content_type
  data.fetch('contentType')
end
download() click to toggle source
# File lib/taleo/attachment.rb, line 23
def download
  unless can_download?
    raise Error.new("Attachment #{id} is not available for download")
  end

  client.download(data.fetch('downloadUrl'))
end
id() click to toggle source
# File lib/taleo/attachment.rb, line 7
def id
  data.fetch('id')
end
type() click to toggle source
# File lib/taleo/attachment.rb, line 11
def type
  data.fetch('attachmentType')
end