Class: Rdomino::DatabaseDirectory

Inherits:
Object
  • Object
show all
Includes:
Enumerable, DomObject
Defined in:
lib/rdomino/database_directory.rb

Instance Method Summary collapse

Methods included from DomObject

#empty?, #method_missing, #obj

Constructor Details

#initialize(server, pattern = //) ⇒ DatabaseDirectory

Returns a new instance of DatabaseDirectory.



5
6
7
8
# File 'lib/rdomino/database_directory.rb', line 5

def initialize(server,pattern=//)
  @obj = Session.session.getdbdirectory(server)
  @pattern = pattern
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rdomino::DomObject

Instance Method Details

#each(pattern = nil) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/rdomino/database_directory.rb', line 10

def each(pattern=nil)
  db = @obj.getfirstdatabase(1247) # Any Notes database (NSF, NSG, or NSH file)
  while db
    yield(Database.new(nil,db)) if db.filepath.match(@pattern) 
    db = @obj.getnextdatabase
  end 
end