gmail_rules.actions.rule_collection.Rule_Collection#
- class Rule_Collection(name: str = 'Rule Collection')[source]#
Bases:
object
Collection of
Rule
that can be organized and stored together- Parameters:
name (
str
, optional) – Name of this collection of rules- Attributes:
final_string
Generates 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
Rule
objects to aRule_Collection
build_final_string
([additional_comment])Builds the final properly formatted collection of rules
Methods
Alias for
Rule_Collection.add_rules()
.Add
Rule
objects to aRule_Collection
Builds 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()
. AddsRule
to aRule_Collection
- add_rules(rules_to_add: Rule | list | tuple | set | frozenset | dict) None [source]#
Add
Rule
objects to aRule_Collection
- Parameters:
rules_to_add (
Rule
or 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