Sha256: 3cc1eb96712d1f8412b782c9d3a4e4adf1425d48cad1bca66b346a16d135f51f

Contents?: true

Size: 756 Bytes

Versions: 24

Compression:

Stored size: 756 Bytes

Contents

module Internals

  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
    
    end
  
  end
  
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
picky-1.5.1 lib/picky/internals/index/file/marshal.rb
picky-1.5.0 lib/picky/internals/index/file/marshal.rb
picky-1.4.3 lib/picky/internals/index/file/marshal.rb
picky-1.4.2 lib/picky/internals/index/file/marshal.rb