Class: DatedBackup::ExecutionContext::Around
- Inherits:
-
Object
- Object
- DatedBackup::ExecutionContext::Around
- Includes:
- ExecutionContextHelper
- Defined in:
- lib/dated_backup/dsl/execution_context.rb
Instance Method Summary collapse
-
#initialize(around = self, &blk) ⇒ Around
constructor
A new instance of Around.
- #remove_old(&blk) ⇒ Object
Methods included from ExecutionContextHelper
#anonymous_instance_loading_module
Constructor Details
#initialize(around = self, &blk) ⇒ Around
Returns a new instance of Around.
52 53 54 |
# File 'lib/dated_backup/dsl/execution_context.rb', line 52 def initialize(around=self, &blk) around.instance_eval &blk end |
Instance Method Details
#remove_old(&blk) ⇒ Object
56 57 58 59 60 |
# File 'lib/dated_backup/dsl/execution_context.rb', line 56 def remove_old(&blk) instance = anonymous_instance_loading_module(DSL::TimeExtensions) instance.instance_eval &blk Core::BackupRemover.remove!(Main.instance.backup_root, instance.kept) end |