Skip to content

rule_data

Module for RuleData interface

!!! classes RuleData

RuleData (IRuleData, ABC)

Class for storing rule information

Source code in entities/rule_data.py
class RuleData(IRuleData, ABC):
    """Class for storing rule information"""

    def __init__(self, name: str):
        """Create RuleData based on provided info dictionary

        Args:
            info (dict[str, Any]):
        """
        self._name = name
        self._output_variable = "output"
        self._description = ""

    @property
    def name(self) -> str:
        """Name to the rule"""
        return self._name

    @property
    def description(self) -> str:
        """Description of the rule"""
        return self._description

    @description.setter
    def description(self, description: str):
        self._description = description

    @property
    def output_variable(self) -> str:
        """Name of the output variable of the rule"""
        return self._output_variable

    @output_variable.setter
    def output_variable(self, output_variable: str):
        self._output_variable = output_variable

description: str property writable

Description of the rule

name: str property readonly

Name to the rule

output_variable: str property writable

Name of the output variable of the rule

__init__(self, name) special

Create RuleData based on provided info dictionary

Parameters:

Name Type Description Default
info dict[str, Any] required
Source code in entities/rule_data.py
def __init__(self, name: str):
    """Create RuleData based on provided info dictionary

    Args:
        info (dict[str, Any]):
    """
    self._name = name
    self._output_variable = "output"
    self._description = ""