Class: Exchanger::FileAttachment

Inherits:
Attachment show all
Defined in:
lib/exchanger/elements/file_attachment.rb

Overview

The FileAttachment element represents a file that is attached to an item in the Exchange store.

msdn.microsoft.com/en-us/library/office/aa580492(v=exchg.150).aspx

Instance Attribute Summary

Attributes inherited from Attachment

#parent_item_id

Attributes inherited from Element

#tag_name

Instance Method Summary collapse

Methods inherited from Attachment

find, find_all, new_from_xml

Methods inherited from Element

#==, #assign_attributes_from_xml, create_element_accessors, element, #errors, #initialize, #inspect, key, new_from_xml, #to_xml, #to_xml_change, #to_xml_updates

Methods included from Persistence

#destroy, #new_record?, #persisted?, #reload, #save

Methods included from Dirty

#attribute_change, #attribute_changed?, #attribute_was, #changed, #changed?, #changes, included, #move_changes, #previous_changes, #reset_attribute!, #reset_modifications, #setup_modifications

Methods included from Attributes

#attributes, #attributes=, #change_key, #id, #identifier, #method_missing, #read_attribute, #respond_to?, #write_attribute

Constructor Details

This class inherits a constructor from Exchanger::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Exchanger::Attributes

Instance Method Details

#contentObject



13
14
15
# File 'lib/exchanger/elements/file_attachment.rb', line 13

def content
  Base64.decode64(read_attribute(:content))
end

#content=(value) ⇒ Object



9
10
11
# File 'lib/exchanger/elements/file_attachment.rb', line 9

def content=(value)
  write_attribute(:content, Base64.encode64(value))
end