Sha256: 004069c27f80601a492ee8f27d37dccd8e3937b5ed127d464371af760cf4aa5f
Contents?: true
Size: 419 Bytes
Versions: 12
Compression:
Stored size: 419 Bytes
Contents
require 'fileutils' File.class_eval do def file_name File.basename path end class << self def write(path, data) File.open(path, "wb") do |file| return file.write(data) end end def create_directory dir FileUtils.mkdir_p dir unless File.exist? dir end def delete_directory dir FileUtils.rm_r dir, force: true if File.exist? dir end end end
Version data entries
12 entries across 12 versions & 1 rubygems