class Ruby::Marshal::Struct

Overview

“S” represents a Struct. Following the type byte is a symbol containing the name of the struct. Following the name is a long indicating the number of members in the struct. Double the number of objects follow the member count. Each member is a pair containing the member’s symbol and an object for the value of that member.

If the struct name does not match a Struct subclass in the running ruby an exception should be raised.

If there is a mismatch between the struct in the currently running ruby and the member count in the marshaled struct an exception should be raised.

Defined in:

ruby-marshal/stream_objects/struct.cr

Constructors

Instance Method Summary

Instance methods inherited from class Ruby::Marshal::StreamObject

size : Int32 size, stream_size stream_size

Constructor methods inherited from class Ruby::Marshal::StreamObject

new(size : Int32) new

Constructor Detail

def self.new(stream : Bytes) #

[View source]

Instance Method Detail

def data : Ruby::Marshal::Null #

[View source]
def populate_class(klass : ::Object) #

[View source]
def read(stream : Bytes) #

[View source]
def read_attr(name : ::String, raw = false) #

[View source]
def read_raw_attr(name : ::String) #

[View source]