* Return the fact value, based on provided parameters * @param {object} params * @param {Almanac} almanac * @return {any} calculation method results
(params, almanac)
| 48 | * @return {any} calculation method results |
| 49 | */ |
| 50 | calculate (params, almanac) { |
| 51 | // if constant fact w/set value, return immediately |
| 52 | if (Object.prototype.hasOwnProperty.call(this, 'value')) { |
| 53 | return this.value |
| 54 | } |
| 55 | return this.calculationMethod(params, almanac) |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Return a cache key (MD5 string) based on parameters |
no outgoing calls
no test coverage detected