Class: RExchange::Session

Inherits:
Folder
  • Object
show all
Defined in:
lib/rexchange/session.rb

Constant Summary

Constants inherited from Folder

Folder::CONTENT_TYPES

Instance Attribute Summary

Attributes inherited from Folder

#credentails, #name

Instance Method Summary collapse

Methods inherited from Folder

#each, #folders, #method_missing, #search, #to_s

Constructor Details

#initialize(uri, username = nil, password = nil) {|_self| ... } ⇒ Session

Creates a Credentials instance to pass to subfolders

Example

RExchange::Session.new('https://mydomain.com/exchange/demo', 'mydomain\\bob', 'secret') do |mailbox|
  mailbox.test.each do |message|
    puts message.subject
  end
end

Yields:

  • (_self)

Yield Parameters:


16
17
18
19
20
21
22
23
# File 'lib/rexchange/session.rb', line 16

def initialize(uri, username = nil, password = nil)

  @credentials = Credentials.new(uri, username, password)
  @parent = @credentials.uri.path
  @folder = ''
  
  yield(self) if block_given?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RExchange::Folder