Class: EWS::Message

Inherits:
Model
  • Object
show all
Defined in:
lib/ews/message.rb

Instance Attribute Summary

Attributes inherited from Model

#service

Instance Method Summary collapse

Methods inherited from Model

#initialize, #method_missing

Constructor Details

This class inherits a constructor from EWS::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EWS::Model

Instance Method Details

#change_keyObject



8
9
10
# File 'lib/ews/message.rb', line 8

def change_key
  @change_key ||= attrs[:item_id][:change_key]
end

#idObject



4
5
6
# File 'lib/ews/message.rb', line 4

def id
  @id ||= attrs[:item_id][:id]
end

#move_to!(folder_id) ⇒ Object



16
17
18
19
# File 'lib/ews/message.rb', line 16

def move_to!(folder_id)
  # TODO: support DistinguishedFolderId?
  service.move_item! folder_id, [self.id]
end

#shallow?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ews/message.rb', line 12

def shallow?
  self.body.nil? || self.header.nil?
end