Utilities to deal with meta-programming.
Dynamic metadata.
This fallback methods dispatch to getting or setting the corresponding metadata on the receving element, depending on the number of given arguments.
For instance, elt: foobar(42)
will dispatch to elt: metadata("foobar", 42)
,
provided that the elt
element does not have a foobar
method.
Conversely, elt: foobar()
will dispatch to elt: inheritedMetadata("foobar")
.
A Golo element have thus a behaviour similar to a DynamicObject
with respect to its metadata.
See also GoloElement::metadata
and GoloElement::inheritedMetadata