Class: Outlook2GCal::OutlookEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/outlook2gcal/outlook_calendar.rb

Instance Method Summary collapse

Constructor Details

#initialize(folder) ⇒ OutlookEvents

Returns a new instance of OutlookEvents.



42
43
44
45
46
# File 'lib/outlook2gcal/outlook_calendar.rb', line 42

def initialize(folder)
  @calendar_items = folder.Items
  @calendar_items.Sort("[Start]")
  @calendar_items.IncludeRecurrences = true
end

Instance Method Details

#eachObject



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/outlook2gcal/outlook_calendar.rb', line 47

def each
  @calendar_items.each do |event|
    begin
      yield OutlookEvent.new(event)
    rescue  StandardError => e 
     print 'X'
     $logger.error DateTime.now.to_s
     $logger.error e 
     $logger.error event
    end
  end
end