MCPcopy Index your code
hub / github.com/hapijs/hapi / rules

Method rules

lib/server.js:538–549  ·  view source on GitHub ↗
(processor, options = {})

Source from the content-addressed store, hash-verified

536 }
537
538 rules(processor, options = {}) {
539
540 Hoek.assert(!this.realm._rules, 'Server realm rules already defined');
541
542 const settings = Config.apply('rules', options);
543 if (settings.validate) {
544 const schema = settings.validate.schema;
545 settings.validate.schema = Validation.compile(schema, null, this.realm, this._core);
546 }
547
548 this.realm._rules = { processor, settings };
549 }
550
551 state(name, options) {
552

Callers 2

constructorMethod · 0.80
route.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected