Class: Outlook2GCal::OutlookCalendar
- Inherits:
-
Object
- Object
- Outlook2GCal::OutlookCalendar
- Defined in:
- lib/outlook2gcal/outlook_calendar.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
Returns the value of attribute db.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#password ⇒ Object
Returns the value of attribute password.
-
#server ⇒ Object
Returns the value of attribute server.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(params) ⇒ OutlookCalendar
constructor
A new instance of OutlookCalendar.
- #quit ⇒ Object
Constructor Details
#initialize(params) ⇒ OutlookCalendar
Returns a new instance of OutlookCalendar.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 17 def initialize(params) @server = params[:notes_server] || '' # local @user = params[:notes_user] @password = params[:notes_password] @db = params[:notes_db] created = false @ol = nil begin @ol = WIN32OLE.connect("Outlook.Application") rescue @created = true @ol = WIN32OLE.new("Outlook.Application") end ns = @ol.GetNameSpace("MAPI") folder = ns.GetDefaultFolder(9) #olFolderCalendar raise "olFolderCalendar View not found" unless folder @events = OutlookEvents.new(folder) end |
Instance Attribute Details
#db ⇒ Object
Returns the value of attribute db.
15 16 17 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 15 def db @db end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
16 17 18 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 16 def events @events end |
#password ⇒ Object
Returns the value of attribute password.
15 16 17 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 15 def password @password end |
#server ⇒ Object
Returns the value of attribute server.
15 16 17 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 15 def server @server end |
#user ⇒ Object
Returns the value of attribute user.
15 16 17 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 15 def user @user end |
Instance Method Details
#quit ⇒ Object
37 38 39 |
# File 'lib/outlook2gcal/outlook_calendar.rb', line 37 def quit @ol.Quit if @created # TODO end |