lib/ezmlm.rb
author Michael Granger <mgranger@laika.com>
Sat, 10 May 2008 01:52:42 +0000
changeset 5 804e1c2b9a40
parent 1 1d3cfd4837a8
child 6 66beb495a861
permissions -rw-r--r--
* Added rdoc-generation to the cruise task and the artifacts that get saved * Added Darkfish external and fixed up the RDoc generation task to use it * Factored out the config-file reading from #owner into a generic config reader, and then added some methods to access config values * Fixed the message-file sort block * Added a DRb service daemon: Ezmlm::ListDaemon

#!/usr/bin/ruby
#
# A Ruby programmatic interface to the ezmlm-idx mailing list system
#
# == Version
#
#  $Id$
#
# == Authors
#
# * Michael Granger <mgranger@laika.com>
# * Jeremiah Jordan <jjordan@laika.com>
#
# :include: LICENSE
# 
#---
#
# Please see the file LICENSE in the base directory for licensing details.
#

require 'pathname'


### Toplevel namespace module
module Ezmlm

	# SVN Revision
	SVNRev = %q$Rev$

	# SVN Id
	SVNId = %q$Id$

	# Package version
	VERSION = '0.0.1'


	require 'ezmlm/list'
	require 'ezmlm/listdaemon'
	

	###############
	module_function
	###############


	### Iterate over each directory that looks like an Ezmlm list in the specified +listsdir+ and
	### yield it as an Ezmlm::List object.
	def each_list( listsdir )
		listsdir = Pathname.new( listsdir )
		Pathname.glob( listsdir + '*' ) do |entry|
			next unless entry.directory?
			next unless ( entry + 'mailinglist' ).exist?

			yield( Ezmlm::List.new(entry) )
		end
	end
	

end # module Ezmlm

# vim: set nosta noet ts=4 sw=4: