Class: NCal2GCal::LotusNotesEvents
- Inherits:
-
Object
- Object
- NCal2GCal::LotusNotesEvents
- Defined in:
- lib/ncal2gcal/lotus_notes_calendar.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(view) ⇒ LotusNotesEvents
constructor
A new instance of LotusNotesEvents.
Constructor Details
#initialize(view) ⇒ LotusNotesEvents
Returns a new instance of LotusNotesEvents.
28 29 30 |
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 28 def initialize(view) @calendar_view = view end |
Instance Method Details
#each ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 31 def each max = 2000 count = 0 uid_list = {} entry = @calendar_view.GetLastDocument while entry #and count < max begin count +=1 if !entry.IsDeleted event = LotusNotesEvent.new(entry) if !uid_list[event.uid] if event.supported? yield(event) else $logger.warn "not supported appointmenttype: " + (event.appointmenttype.to_s || "appointmenttype missing") end uid_list[event.uid]=true end end rescue StandardError => e print 'X' $logger.error DateTime.now.to_s $logger.error e $logger.error entry end entry = @calendar_view.GetPrevDocument(entry) end end |