lib/stashify/directory.rb in stashify-2.1.1 vs lib/stashify/directory.rb in stashify-3.0.0

- old
+ new

@@ -31,10 +31,14 @@ def write_directory(directory) subdir = self.directory(directory.name) directory.files.each { |file| subdir.write(file) } end + def write_file(file) + file(file.name).write(file.contents) + end + def delete(name) if directory?(name) delete_directory(name) else delete_file(name) @@ -42,9 +46,13 @@ end def delete_directory(name) subdir = directory(name) subdir.files.each { |file| subdir.delete(file.name) } + end + + def delete_file(name) + file(name).delete end def ==(other) files == other.files end