Skip to content

Component

Base class for Objectscript class components.

doc_string = field(default_factory=list, kw_only=True)

Optional documentation string, using the form of a 3 slashes comment above the Objectscript component.

Can be a string or list of string for multilines comments.

keywords = field(default_factory=dict, kw_only=True)

Compiler keywords

see: Introduction to Compiler Keywords

Optional dict used to specify keywords for this component.

Use {"Keyword": None} for keywords that do not have a value.

name

Name of the Objectscript component.

format_name()

Enclose name with quotes if name contains spaces or underscores.

get_template()

Returns the name of the Jinja2 template used by component

on_generate()

Function called before class generation, can be overriden by subclasses for specific purposes.