(processor, options = {})
| 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 |
no outgoing calls
no test coverage detected