class Clean < Array def update ['.yardoc','log','tmp','obj'].each{|dir| CLEAN.include(dir) if File.exists?(dir) } CLEAN.include('**/*.{suo,sdf}') add '<%Rake::Task[:clean].reenable%>' add '<%Rake::Task[:clean].invoke%>' end end