class Ruby::Marshal::HashWithDefault

Overview

For a Hash with a default value, the default value follows all the pairs.

Defined in:

ruby-marshal/stream_objects/hash_with_default.cr

Constructors

Instance Method Summary

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

[](requested_key : ::String)
[](requested_key : Int32)
[]
, data : Hash(Ruby::Marshal::StreamObject, Ruby::Marshal::StreamObject) data, default_value : Ruby::Marshal::StreamObject default_value, each(&) each, raw_hash : ::Hash(RawHashObjects, RawHashObjects) raw_hash, read(stream : Bytes) read

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

new(stream : Bytes) new

Macros inherited from class Ruby::Marshal::Hash

add_hash_accessor(klass) add_hash_accessor

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 read(stream : Bytes) #
Description copied from class Ruby::Marshal::Hash

instantiate the class if it exists and assign to @data


[View source]