Class: DeleteOldPagesHelper
- Inherits:
-
Object
- Object
- DeleteOldPagesHelper
- Defined in:
- lib/helpers/maintenance-helpers.rb
Instance Method Summary collapse
-
#initialize(wiki, event_to_check_on = :day, age_to_wipe_at = 60*60*24*100) ⇒ DeleteOldPagesHelper
constructor
Default wakes up each day at midnight and wipes all deleted pages more than 100 days old.
Constructor Details
#initialize(wiki, event_to_check_on = :day, age_to_wipe_at = 60*60*24*100) ⇒ DeleteOldPagesHelper
Default wakes up each day at midnight and wipes all deleted pages more than 100 days old
4 5 6 7 8 |
# File 'lib/helpers/maintenance-helpers.rb', line 4 def initialize( wiki, event_to_check_on = :day, age_to_wipe_at = 60*60*24*100 ) @wiki = wiki @age_to_wipe_at = age_to_wipe_at @wiki.watch_for(event_to_check_on) { check_and_delete_pages } end |