Class: Alloy::Task::Clean::Chore

Inherits:
Object
  • Object
show all
Defined in:
lib/alloy/task/clean.rb

Class Method Summary collapse

Class Method Details

.clean_up(path) ⇒ Object



27
28
29
30
31
32
33
34
# File 'lib/alloy/task/clean.rb', line 27

def self.clean_up(path)
  if Dir.exist?(path)
    FileUtils.rm_r Dir.glob("#{path}/*"), :force => true
    puts "Cleaned #{path}".blue
  else
    puts "Directory '#{path}' not found".red
  end
end

.clean_up_androidObject



23
24
25
# File 'lib/alloy/task/clean.rb', line 23

def self.clean_up_android
  clean_up('build/android')
end

.clean_up_iphoneObject



19
20
21
# File 'lib/alloy/task/clean.rb', line 19

def self.clean_up_iphone
  clean_up('build/iphone')
end