X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Frm%2Frm_plugin.rb;h=cad493d9f85c95ae8a3c79bee121e59c508a8efb;hp=0c155a18f9441521d1ee3a6c9445927c19bd022a;hb=51f027b01e242737956c3ab5aecdd322d6ceeeed;hpb=ec3c9099a29f40d95f055ea0f7fb25a99d913de3 diff --git a/lib/rm/rm_plugin.rb b/lib/rm/rm_plugin.rb index 0c155a1..cad493d 100644 --- a/lib/rm/rm_plugin.rb +++ b/lib/rm/rm_plugin.rb @@ -3,6 +3,18 @@ module RmPlugin # Plugins for the removal of accounts. # + def RmPlugin.included(c) + # Callback, called whenever another class or module includes this + # one. The parameter given is the name of the class or module + # that included us. + @includers ||= [] + @includers << c + end + + def RmPlugin.includers + return @includers + end + def delete_domain(domain) # Delete the given domain. raise NotImplementedError @@ -13,15 +25,11 @@ module RmPlugin raise NotImplementedError end - def get_leftover_domains(db_domains) - # Given a list of domains, determine which domains belonging to - # this plugin are not contained in the given list. + def get_domain_usernames(domain) + # Get a list of usernames for a given domain, + # needed to delete accounts before removing + # a domain. raise NotImplementedError end - def get_leftover_accounts(db_accounts) - # Given a list of accounts, determine which accounts belonging to - # this plugin are not contained in the given list. - raise NotImplementedError - end end