Class: Rockdove::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rockdove/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.archive_folderObject

Returns the value of attribute archive_folder.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def archive_folder
  @archive_folder
end

.ignore_mailsObject

Returns the value of attribute ignore_mails.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def ignore_mails
  @ignore_mails
end

.incoming_folderObject

Returns the value of attribute incoming_folder.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def incoming_folder
  @incoming_folder
end

.passwordObject

Returns the value of attribute password.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def password
  @password
end

.urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def url
  @url
end

.usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def username
  @username
end

.watch_intervalObject

Returns the value of attribute watch_interval.



4
5
6
# File 'lib/rockdove/config.rb', line 4

def watch_interval
  @watch_interval
end

Class Method Details

.configure(&block) ⇒ Object



7
8
9
10
# File 'lib/rockdove/config.rb', line 7

def self.configure(&block)
  block.call(self)
  connect
end

.connectObject



40
41
42
43
44
# File 'lib/rockdove/config.rb', line 40

def self.connect
  Viewpoint::EWS::EWS.endpoint = @url
  Viewpoint::EWS::EWS.set_auth @username, @password
  Viewpoint::EWS::EWS.instance
end

.ews_archive_folder(value) ⇒ Object



28
29
30
# File 'lib/rockdove/config.rb', line 28

def self.ews_archive_folder(value)
  @archive_folder = value
end

.ews_folder(value) ⇒ Object



24
25
26
# File 'lib/rockdove/config.rb', line 24

def self.ews_folder(value)
  @incoming_folder = value || 'Inbox'
end

.ews_ignore_mails(value) ⇒ Object



36
37
38
# File 'lib/rockdove/config.rb', line 36

def self.ews_ignore_mails(value)
  @ignore_mails = value || []
end

.ews_password(value) ⇒ Object



20
21
22
# File 'lib/rockdove/config.rb', line 20

def self.ews_password(value)
  @password = value
end

.ews_url(value) ⇒ Object



12
13
14
# File 'lib/rockdove/config.rb', line 12

def self.ews_url(value)
  @url = value
end

.ews_username(value) ⇒ Object



16
17
18
# File 'lib/rockdove/config.rb', line 16

def self.ews_username(value)
  @username = value
end

.ews_watch_interval(value) ⇒ Object



32
33
34
# File 'lib/rockdove/config.rb', line 32

def self.ews_watch_interval(value)
  @watch_interval = value || 60
end