Sha256: a44ebe7fe01928cdb64a7cea9584cc4c39862364b69b28e5589ca549e251bfbb
Contents?: true
Size: 583 Bytes
Versions: 2
Compression:
Stored size: 583 Bytes
Contents
require 'sugar-high/blank' require 'sugar-high/arguments' require 'sugar-high/path' require 'sugar-high/regexp' require 'sugar-high/string' require 'sugar-high/file' module FileMutate module Delete module ClassMethods def delete! name return nil if !File.exist?(name) File.delete name end alias_method :delete_file!, :delete! end def delete! File.delete(self.path) end alias_method :delete_file!, :delete! def mutate marker, place, &block File.mutate_file self.path, marker, place, &block end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
file_mutate-0.1.3 | lib/file_mutate/delete.rb |
file_mutate-0.1.2 | lib/file_mutate/delete.rb |