Sha256: 992bdc482c399fbd0c929894227027f764d858cb252ea0bcde1b1337c58cd983

Contents?: true

Size: 405 Bytes

Versions: 13

Compression:

Stored size: 405 Bytes

Contents

module ModernTimes
  module MarshalStrategy
    module Ruby
      extend self

      def marshal_type
        :bytes
      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(:ruby => self)
      
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
modern_times-0.3.12 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.11 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.10 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.9 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.8 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.7 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.6 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.5 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.4 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.3 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.2 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.1 lib/modern_times/marshal_strategy/ruby.rb
modern_times-0.3.0 lib/modern_times/marshal_strategy/ruby.rb