class Restforce::Document

def Body

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

Examples

Public: Returns the body of the document.
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