Sha256: 7e136753cec86dc53f7136f2b5d0fb9501b5577e3d67068f752021c44e6ea40a

Contents?: true

Size: 575 Bytes

Versions: 2

Compression:

Stored size: 575 Bytes

Contents

class ExternalizableTest
  include RocketAMF::Pure::IOHelperRead
  include RocketAMF::Pure::IOHelperWrite

  attr_accessor :one, :two

  #
  # Methods
  #

  def encode_amf(serializer)
    serializer.write_object(self, nil, {class_name: 'ExternalizableTest', dynamic: false, externalizable: true, members: []})
  end

  def read_external(deserializer)
    @one = read_double(deserializer.source)
    @two = read_double(deserializer.source)
  end

  def write_external(serializer)
    serializer.stream << pack_double(@one)
    serializer.stream << pack_double(@two)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mrpin-rocketamf-2.0.1 spec/helpers/externalizable_test.rb
mrpin-rocketamf-2.0.0 spec/helpers/externalizable_test.rb