i_parser_rule_base
Module for IParserRuleBase class !!! classes IParserRuleBase
IParserRuleBase (ABC)
Class for the parser of the basic rules
Source code in parsers/i_parser_rule_base.py
class IParserRuleBase(ABC):
"""Class for the parser of the basic rules"""
@property
@abstractmethod
def rule_type_name(self) -> str:
"""Type name for the rule"""
@abstractmethod
def parse_dict(self, dictionary: Dict[str, Any], logger: ILogger) -> IRuleData:
"""Parses the provided dictionary to a rule
Args:
dictionary (Dict[str, Any]): Dictionary holding the values
for making the rule
Returns:
RuleBase: Rule based on the provided data
"""
rule_type_name: str
property
readonly
Type name for the rule
parse_dict(self, dictionary, logger)
Parses the provided dictionary to a rule
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dictionary |
Dict[str, Any] |
Dictionary holding the values for making the rule |
required |
Returns:
Type | Description |
---|---|
RuleBase |
Rule based on the provided data |
Source code in parsers/i_parser_rule_base.py
@abstractmethod
def parse_dict(self, dictionary: Dict[str, Any], logger: ILogger) -> IRuleData:
"""Parses the provided dictionary to a rule
Args:
dictionary (Dict[str, Any]): Dictionary holding the values
for making the rule
Returns:
RuleBase: Rule based on the provided data
"""