Sha256: 53e423a0c46744120562b4ba4ece0fc98dc8ebdfc258759abefa1f038c071b4d
Contents?: true
Size: 860 Bytes
Versions: 22
Compression:
Stored size: 860 Bytes
Contents
#-- # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # Version 2, December 2004 # # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION # # 0. You just DO WHAT THE FUCK YOU WANT TO. #++ class Gennaro def delete_dir(path) FileUtils.rm_r path if Dir.exists? path end protected def mkdir(path) Dir.mkdir path unless Dir.exists? path end protected def copy(what, where) FileUtils.copy_entry what, where end protected def each_file(path, &block) Dir.glob("#{path}/**/*").each { |f| next if File.directory? f yield f } end protected def rename(file, first, after) new_file = file.gsub(first, after) FileUtils.mv file, new_file if file != new_file end end
Version data entries
22 entries across 22 versions & 1 rubygems