Class: NCal2GCal::LotusNotesCalendar

Inherits:
Object
  • Object
show all
Defined in:
lib/ncal2gcal/lotus_notes_calendar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ LotusNotesCalendar

Returns a new instance of LotusNotesCalendar.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 12

def initialize(params)
  @server = params[:notes_server] || '' # local
  @user = params[:notes_user] 
  @password = params[:notes_password] 
  @db = params[:notes_db] 
  
  session = WIN32OLE.new 'Lotus.NotesSession'
  session.Initialize(@password)
  db = session.GetDatabase(@server, @db)
  raise "unable to open database: #{db}" unless db.isOpen

  @events = LotusNotesEvents.new(db.GetView("$Calendar"))
  raise "$Calendar View not found" unless @events
end

Instance Attribute Details

#dbObject

Returns the value of attribute db.



10
11
12
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 10

def db
  @db
end

#eventsObject (readonly)

Returns the value of attribute events.



11
12
13
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 11

def events
  @events
end

#passwordObject

Returns the value of attribute password.



10
11
12
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 10

def password
  @password
end

#serverObject

Returns the value of attribute server.



10
11
12
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 10

def server
  @server
end

#userObject

Returns the value of attribute user.



10
11
12
# File 'lib/ncal2gcal/lotus_notes_calendar.rb', line 10

def user
  @user
end