lib/astrails/safe/sink.rb in astrails-safe-0.1.9 vs lib/astrails/safe/sink.rb in astrails-safe-0.1.10

- old
+ new

@@ -9,12 +9,16 @@ cleanup end protected - # prefix is defined in subclass - def path - @path ||= File.join(prefix, @backup.filename) + @backup.extension + # path is defined in subclass + def base + @base ||= File.join(path, File.basename(@backup.filename).split(".").first) + end + + def full_path + @full_path ||= File.join(path, @backup.filename) + @backup.extension end # call block on files to be removed (all except for the LAST 'limit' files def cleanup_with_limit(files, limit, &block) return unless files.size > limit \ No newline at end of file