Sha256: 9cd370e3313a41c2ff6696f7dfcdfbfc74874f7ae7d2be5342af0f8a1ba598ca

Contents?: true

Size: 234 Bytes

Versions: 2

Compression:

Stored size: 234 Bytes

Contents

require "base64"

module BBQueue
  module Serializer
    def self.dump(object)
      Base64.strict_encode64 Marshal.dump(object)
    end

    def self.load(object)
      Marshal.load Base64.strict_decode64(object)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bbqueue-0.0.2 lib/bbqueue/serializer.rb
bbqueue-0.0.1 lib/bbqueue/serializer.rb