Class ObjectBuilder
A specialized stack which is used to build a RomlObject hierarchy.
Info:
- License: MIT
- Author: Richard Voelker
Methods
ObjectBuilder.new (self, root) | Create a new ObjectBuilder, starting with the main parent. |
ObjectBuilder.Build (self, object[, classes={}[, properties={}]]) | Create a new RomlObject whose parent is the current top of the stack. |
ObjectBuilder.Pop (self) | Remove and return the top RomlObject from the Builder. |
Methods
- ObjectBuilder.new (self, root)
-
Create a new ObjectBuilder, starting with the main parent.
Parameters:
- self ObjectBuilder
- root
Instance
The starting ROBLOX object to build
from.
- ObjectBuilder.Build (self, object[, classes={}[, properties={}]])
-
Create a new RomlObject whose parent is the current top of
the stack. The new object is then pushed to the top of the
stack and returned.
Parameters:
- self ObjectBuilder
- object Instance The ROBLOX object to wrap.
- classes
table
The classes to place on the
(default {})<a href="../classes/RomlObject.html#">RomlObject</a>.
- properties
table
The properties to set on the
(default {})<a href="../classes/RomlObject.html#">RomlObject</a>.
Returns:
-
RomlObject
The newly created RomlObject.
- ObjectBuilder.Pop (self)
-
Remove and return the top RomlObject from the Builder.
Parameters:
- self ObjectBuilder
Returns:
-
RomlObject
The removed RomlObject.