Class: EWS::Folder

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

Instance Attribute Summary

Attributes inherited from Model

#service

Instance Method Summary collapse

Methods inherited from Model

#initialize, #method_missing, #shallow?

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/folder.rb', line 8

def change_key
  attrs[:folder_id][:change_key]
end

#each_messageObject



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

def each_message
  items.each {|message| yield message }
end

#foldersObject



20
21
22
23
24
25
# File 'lib/ews/folder.rb', line 20

def folders
  @folders ||= find_folders.inject({}) do |folders, folder|
    folders[folder.name] = folder
    folders
  end
end

#idObject



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

def id
  attrs[:folder_id][:id]
end

#itemsObject



27
28
29
# File 'lib/ews/folder.rb', line 27

def items
  @items ||= find_folder_items
end

#nameObject



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

def name
  attrs[:display_name]
end