gmail_rules.actions.rule_collection.Rule_Collection#
- class Rule_Collection(name: str = 'Rule Collection')[source]#
Bases:
objectCollection of
Rulethat can be organized and stored together- Parameters:
name (
str, optional) – Name of this collection of rules- Attributes:
final_stringGenerates the final string representation of a collection of rules
Methods
add_rule(rule_to_add)Alias for
Rule_Collection.add_rules().add_rules(rules_to_add)Add
Ruleobjects to aRule_Collectionbuild_final_string([additional_comment])Builds the final properly formatted collection of rules
Methods
Alias for
Rule_Collection.add_rules().Add
Ruleobjects to aRule_CollectionBuilds the final properly formatted collection of rules
Attributes
Generates the final string representation of a collection of rules
str representing the name of the collection of rules
list of Rule objects that will be included in a single file
dict where keys are a rule's title (rule_title) and the values are that rule
- add_rule(rule_to_add: Rule) None[source]#
Alias for
Rule_Collection.add_rules(). AddsRuleto aRule_Collection
- add_rules(rules_to_add: Rule | list | tuple | set | frozenset | dict) None[source]#
Add
Ruleobjects to aRule_Collection- Parameters:
rules_to_add (
Ruleor list or tuple or set or frozenset or dict) – TheRule(orRule) that should be added to theRule_Collection- Raises:
- build_final_string(additional_comment: str | None = None) str[source]#
Builds the final properly formatted collection of rules
- property final_string: str#
Generates the final string representation of a collection of rules
- Returns:
str representing the xmls of all the rules in this collection
- Return type:
- name#
str representing the name of the collection of rules