Renderer
elva.renderer
Module holding renderer components.
Classes:
-
TextRenderer
–Component rendering Y text data types to text files.
TextRenderer(ytext, path, auto_render=True)
Bases: Component
Component rendering Y text data types to text files.
Parameters:
-
ytext
(Text
) –instance of a Y text data type.
Methods:
-
run
–Hook after the component has been started.
-
cleanup
–Hook after the component has been cancelled.
-
write
–Render the contents of
ytext
to file.
Attributes:
-
ytext
(Text
) –Instance of a Y text data type.
-
path
(Path
) –Path where to store the rendered text file.
-
auto_render
(bool
) –Flag whether to render to text file on hook execution.
Source code in src/elva/renderer.py
ytext = ytext
instance-attribute
Instance of a Y text data type.
path = anyio.Path(path)
instance-attribute
Path where to store the rendered text file.
auto_render = auto_render
instance-attribute
Flag whether to render to text file on hook execution.
run()
async
Hook after the component has been started.
The contents of self.ytext
get rendered to file if auto_render
is True
.
cleanup()
async
Hook after the component has been cancelled.
The contents of self.ytext
get rendered to file if auto_render
is True
.
Source code in src/elva/renderer.py
write()
async
Render the contents of ytext
to file.