Commit 8f2f3f21 authored by Tristan Cavelier's avatar Tristan Cavelier

job rules getter added to JIO

parent 4f9a7135
/*jslint indent: 2, maxlen: 80, sloppy: true */
/*global exports, defaults */
// adds
// - jIO.addJobRuleCondition(name, function)
function addJobRuleCondition(name, method) {
if (typeof name !== 'string') {
throw new TypeError("jIO.addJobRuleAction(): " +
"Argument 1 is not of type 'string'");
}
if (typeof method !== 'function') {
throw new TypeError("jIO.addJobRuleAction(): " +
"Argument 2 is not of type 'function'");
}
if (defaults.job_rule_conditions[name]) {
throw new TypeError("jIO.addJobRuleAction(): Action already exists");
}
defaults.job_rule_conditions[name] = method;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment