lib/picky/index/file/marshal.rb in picky-0.11.2 vs lib/picky/index/file/marshal.rb in picky-0.12.0

- old
+ new

@@ -1,19 +1,29 @@ module Index module File + # Index data in the Ruby Marshal format. + # class Marshal < Basic + # Uses the extension "dump". + # def extension :dump end + # Loads the index hash from marshal format. + # def load ::Marshal.load ::File.open(cache_path, 'r:binary') end + # Dumps the index hash in marshal format. + # def dump hash hash.dump_marshalled cache_path end + # A marshal file does not provide retrieve functionality. + # def retrieve raise "Can't retrieve from marshalled file. Use text file." end end \ No newline at end of file