Sha256: e725c20deb03e0f33f035453d056021cc8e3943dcdb681dabc0c862dc88a9cf2

Contents?: true

Size: 425 Bytes

Versions: 7

Compression:

Stored size: 425 Bytes

Contents

module Qwirk
  module MarshalStrategy
    module Ruby
      extend self

      def marshal_type
        :bytes
      end

      def to_sym
        :ruby
      end

      def marshal(object)
        ::Marshal.dump(object)
      end

      def unmarshal(msg)
        msg = ::String.from_java_bytes(msg) unless msg.kind_of?(::String)
        ::Marshal.load(msg)
      end

      MarshalStrategy.register(self)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qwirk-0.2.4 lib/qwirk/marshal_strategy/ruby.rb
qwirk-0.2.3 lib/qwirk/marshal_strategy/ruby.rb
qwirk-0.2.2 lib/qwirk/marshal_strategy/ruby.rb
qwirk-0.2.1 lib/qwirk/marshal_strategy/ruby.rb
qwirk-0.2.0 lib/qwirk/marshal_strategy/ruby.rb
qwirk-0.1.0 lib/qwirk/marshal_strategy/ruby.rb
qwirk-0.0.1 lib/qwirk/marshal_strategy/ruby.rb