Top

Secret Chronicles of the Scripting API documentation

Class SaveSerializer

This is an internal class. Instances of it are created from the C++ code. It's the class for the storage object passed to LevelClass' save_load event handler.

This class includes mruby's Enumerable module. Note however that no particular order of the elements is guaranteed.

Instance Methods

[]

serializer[str] → an_object

Retrieves the object stored under str from the savegame. If there is no object under that key, returns nil.

[]=

serializer[str] = value → value

Stores the object value in the savegame data under the given str. str has to be a string.

each

each() { |ary| ... }

Iterates all values stored in the serializer. The block receives a two-argument array of form [key, value].

inspect

inspect() → a_string

Returns a human-readable description of this object.