require 'common/plugin'
require 'common/user'
+# Code that all Agendav plugins ({AgendavPrune}, {AgendavRm},
+# {AgendavMv}) share.
module AgendavPlugin
- # Code that all Agendav plugins (Prune, Rm, Mv...) will
- # share. That is, we implement the Plugin interface.
+
+ # We implement the Plugin "interface."
include Plugin
+ # Initialize this Agendav {Plugin} with values in *cfg*.
+ #
+ # @param cfg [Configuration] the configuration for this plugin.
+ #
def initialize(cfg)
@db_host = cfg.agendav_dbhost
@db_port = cfg.agendav_dbport
end
+ # Return a list of Agendav users.
+ #
+ # @return [Array<User>] a list of users contained in the
+ # Agendav database.
+ #
def list_users()
- #
- # Produce a list of AgenDAV users. This is public because it's
- # useful in testing.
- #
users = []
connection = PGconn.connect(@db_host, @db_port, @db_opts, @db_tty,