]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/agendav_plugin.rb
Document everything with YARD and fix some bugs along the way.
[mailshears.git] / lib / common / agendav_plugin.rb
index 9af7b01519b40aca2870176948ed4f0ac6f950cb..8eb73c19e029259426f9958e94f81af373ab0a14 100644 (file)
@@ -1,12 +1,18 @@
 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
@@ -18,11 +24,12 @@ module AgendavPlugin
   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,