Class: MessagePack::Factory::Pool
- Inherits:
-
Object
- Object
- MessagePack::Factory::Pool
- Defined in:
- doclib/msgpack/factory.rb
Instance Method Summary collapse
-
#dump(object) ⇒ String
Serialize the passed value.
-
#load(data) ⇒ Object
Deserializes an object from the string or io and returns it.
-
#packer {|packer| ... } ⇒ Object
Yields a Packer from the pool, and check it back in.
-
#unpacker {|unpacker| ... } ⇒ Object
Yields an Unpacker from the pool, and check it back in.
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>.
139 140 |
# File 'doclib/msgpack/factory.rb', line 139 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.
127 128 |
# File 'doclib/msgpack/factory.rb', line 127 def load(data) end |
#packer {|packer| ... } ⇒ Object
Yields a Packer from the pool, and check it back in.
The packer should no longer be held after the block has returned.
161 162 |
# File 'doclib/msgpack/factory.rb', line 161 def packer(&block) end |
#unpacker {|unpacker| ... } ⇒ Object
Yields an Unpacker from the pool, and check it back in.
The unpacker should no longer be held after the block has returned.
150 151 |
# File 'doclib/msgpack/factory.rb', line 150 def unpacker(&block) end |