Sha256: 12b358c2ac3ab432149b52a64bf58d4352898fc722d3a9fbf96d26ca1e9169b5

Contents?: true

Size: 522 Bytes

Versions: 10

Compression:

Stored size: 522 Bytes

Contents

module Picky

  # This class handles serialization and deserialization.
  #
  class Serializer

    # Serialize the Results.
    #
    # Note: This code is executed on the search engine side.
    #
    def self.serialize serializable_results
      Marshal.dump serializable_results.serialize
    end

    # Create new search results from serialized ones.
    #
    # Note: This code is executed on the client side.
    #
    def self.deserialize serialized_results
      Marshal.load serialized_results
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
picky-client-0.1.0 lib/picky-client/serializer.rb
picky-client-0.0.9 lib/picky-client/serializer.rb
picky-client-0.0.8 lib/picky-client/serializer.rb
picky-client-0.0.7 lib/picky-client/serializer.rb
picky-client-0.0.6 lib/picky-client/serializer.rb
picky-client-0.0.5 lib/picky-client/serializer.rb
picky-client-0.0.4 lib/picky-client/serializer.rb
picky-client-0.0.3 lib/picky-client/serializer.rb
picky-client-0.0.2 lib/picky-client/serializer.rb
picky-client-0.0.1 lib/picky-client/serializer.rb