Class: Papa::Task::Sandbox::Clean
- Inherits:
-
Object
- Object
- Papa::Task::Sandbox::Clean
- Defined in:
- lib/papa/task/sandbox/clean.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Clean
constructor
A new instance of Clean.
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Clean
Returns a new instance of Clean.
10 11 12 |
# File 'lib/papa/task/sandbox/clean.rb', line 10 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/papa/task/sandbox/clean.rb', line 8 def @options end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 |
# File 'lib/papa/task/sandbox/clean.rb', line 14 def run Helper::Output.stdout('Started cleaning sandbox directories...') unless [:silent] path = File.join(Helper::Path::TMP_PATH, Helper::Path::SANDBOX_PREFIX) Command::Base.new("rm -rf #{path}*").run Helper::Output.success('Successfully removed sandbox directories.') end |