Skip to content

The ResourceRule class

Bryan Oakley edited this page Jan 5, 2015 · 1 revision

The ResourceRule class is an abstract class that should be inherited by all rules that operate on a resource file. When the rule is applied (ie: the apply method is called), an instance of the resource file will be passed as a parameter. The class has an attribute named severity which defines the severity of the rule. The default severity is WARNING but may be overridden in the concrete class.

Every class that inherits from this class must define a method named apply. This method must take exactly one parameter, a ResourceFile object.