Class: Restforce::Attachment
- Defined in:
- lib/restforce/attachment.rb
Instance Method Summary collapse
-
#Body ⇒ Object
Public: Returns the body of the attachment.
Methods inherited from SObject
#attrs, #describe, #describe_layouts, #destroy, #destroy!, #save, #save!, #sobject_type, #to_sparam
Methods inherited from Mash
build, #convert_value, #dup, #initialize, klass
Constructor Details
This class inherits a constructor from Restforce::Mash
Instance Method Details
#Body ⇒ Object
Public: Returns the body of the attachment.
Examples
= client.query('select Id, Name, Body from Attachment').first
File.open(.Name, 'wb') { |f| f.write(.Body) }
11 12 13 14 |
# File 'lib/restforce/attachment.rb', line 11 def Body ensure_id && ensure_body @client.get(super).body end |