Sha256: 88db20d22e0d2f8e8392ce5d62878f40faf59189cc720a5caeaef5488a128b08

Contents?: true

Size: 298 Bytes

Versions: 12

Compression:

Stored size: 298 Bytes

Contents

# -- coding: utf-8

require "rubygems"
begin
  require "msgpack"
rescue LoadError
end

class KyotoTycoon
  module Serializer
    class Msgpack
      def self.encode(obj)
        obj.to_msgpack
      end

      def self.decode(str)
        MessagePack.unpack(str) if str
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
genki-kyototycoon-0.6.1 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.6.1 lib/kyototycoon/serializer/msgpack.rb
genki-kyototycoon-0.6.0.1 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.6.0 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.6 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.5 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.4 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.3 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.2 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.1 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.5.0 lib/kyototycoon/serializer/msgpack.rb
kyototycoon-0.1.2 lib/kyototycoon/serializer/msgpack.rb