(options)
| 502 | } |
| 503 | |
| 504 | route(options) { |
| 505 | |
| 506 | Hoek.assert(typeof options === 'object', 'Invalid route options'); |
| 507 | |
| 508 | options = [].concat(options); |
| 509 | for (const config of options) { |
| 510 | if (Array.isArray(config.method)) { |
| 511 | for (const method of config.method) { |
| 512 | const settings = Object.assign({}, config); // Shallow cloned |
| 513 | settings.method = method; |
| 514 | this._addRoute(settings, this); |
| 515 | } |
| 516 | } |
| 517 | else { |
| 518 | this._addRoute(config, this); |
| 519 | } |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | _addRoute(config, server) { |
| 524 |
no test coverage detected