Metadata
(in ./Carbon/Metadata.lua)Provides an interface to the Graphene Metadata API in a more friendly way. Metadata is normally handled at the Graphene level because it allows modules to register themselves automatically.
Methods
class public Metadata:Get(any object, [any field]
)
Returns any?
- required
object
: The object to look up metadata for. - optional
field
: A field, if specified, to query the object for.
Requests metadata about the given object.
If the field argument is given, that key is returned from the object if the object exists.
class public Metadata:Set(any object, [any metadata]
)
Returns void
- required
object
: The object to set metadata for. - optional
metadata
: The metadata to set for the object, specify nil to remove the object's metadata.
Associates the given object with a piece of metadata.
class public Metadata:Disable()
Returns void
Disables metadata storage.
class public Metadata:Enable()
Returns void
Enables metadata storage.
class public Metadata:RegisterMethods(table object, table metadata
)
Returns void
- required
object
: An object that contains methods to register. - required
metadata
: The metadata object associated with this object.
Automatically registers all the methods of a given object with the registry.
Properties
[none]