Class: Pione::Command::PioneCleanContext
- Inherits:
-
Rootage::CommandContext
- Object
- Rootage::ProcessContext
- Rootage::CommandContext
- Pione::Command::PioneCleanContext
- Defined in:
- lib/pione/command/pione-clean.rb
Overview
PioneCleanContext
is a process context for pione-clean-context
.
Instance Attribute Summary
Attributes inherited from Rootage::ProcessContext
Instance Method Summary collapse
-
#delete?(entry) ⇒ Boolean
Return true if the entry should be removed.
-
#type?(type) ⇒ Boolean
Return true if the type is matched.
Methods inherited from Rootage::CommandContext
Methods inherited from Rootage::ProcessContext
#fail, #initialize, make, #test
Constructor Details
This class inherits a constructor from Rootage::ProcessContext
Instance Method Details
#delete?(entry) ⇒ Boolean
Return true if the entry should be removed.
168 169 170 |
# File 'lib/pione/command/pione-clean.rb', line 168 def delete?(entry) not(entry.exist?) or model[:older].nil? or model[:older] >= entry.mtime.to_date end |
#type?(type) ⇒ Boolean
Return true if the type is matched.
163 164 165 |
# File 'lib/pione/command/pione-clean.rb', line 163 def type?(type) model[:type] == "all" or model[:type] == type end |