destroy action implemented

This commit is contained in:
Thilko Richter
2012-09-06 07:38:54 +02:00
parent d084128297
commit 8a41dca46d
3 changed files with 52 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Homesick
module Actions
# TODO move this to be more like thor's template, empty_directory, etc
@@ -75,6 +76,16 @@ class Homesick
end
end
def rm(file)
say_status "rm #{file}", '', :green unless options[:quiet]
system "rm #{file}"
end
def rm_r(dir)
say_status "rm -r #{dir}", '', :green unless options[:quiet]
system "rm -r #{dir}"
end
def ln_s(source, destination, config = {})
source = Pathname.new(source)
destination = Pathname.new(destination)