Class: Rule

Rule

Rule class.

Constructor

new Rule(num, name, nouns, initEnabled) → {Rule}

The Rule class.
Parameters:
Name Type Default Description
num number One-based number of the rule.
name string Name.
nouns Array null Array of nouns.
initEnabled boolean true
Version:
  • 2017-03-27
Author:
Source:
Returns:
Initial/reset value of the enabled field.
Type
Rule

Members

enabled

Whether the rule should be referenced (true) or ignored (false).
Source:

f

Function that checks for rule violations and/or triggers marks to be entered.
Source:

hits

Number of times the rule has been referenced.
Source:

initEnabled

Initial/reset value of the enabled field.
Source:

name

Name of the rule.
Source:

nouns

Optional array of nouns referenced in the rule.
Source:

num

One-based number of the rule.
Source:

Methods

reset()

Resets the rule.
Source: