class Restforce::Attachment

def Body

File.open(attachment.Name, 'wb') { |f| f.write(attachment.Body) }
attachment = client.query('select Id, Name, Body from Attachment').first

Examples

Public: Returns the body of the attachment.
def Body
  ensure_id && ensure_body
  @client.get(super).body
end

def ensure_body

def ensure_body
  return true if self.Body?
  raise 'You need to query the Body for the record first.'
end