Class: MessagePack::Factory::Pool

Inherits:
Object
  • Object
show all
Defined in:
doclib/msgpack/factory.rb

Instance Method Summary collapse

Instance Method Details

#dump(object) ⇒ String

Serialize the passed value

If it could not serialize the object, it raises NoMethodError: undefined method `to_msgpack' for #<the_object>.

Parameters:

  • obj (Object)

    object to serialize

Returns:

  • (String)

    serialized object



141
142
# File 'doclib/msgpack/factory.rb', line 141

def dump(object)
end

#load(data) ⇒ Object

Deserializes an object from the string or io and returns it.

If there're not enough data to deserialize one object, this method raises EOFError. If data format is invalid, this method raises MessagePack::MalformedFormatError. If the object nests too deeply, this method raises MessagePack::StackError.

See Unpacker#initialize for supported options.

Parameters:

Returns:

  • (Object)

    deserialized object



129
130
# File 'doclib/msgpack/factory.rb', line 129

def load(data)
end