(attribute, withDefault)
| 127 | } |
| 128 | |
| 129 | get (attribute, withDefault) { |
| 130 | if (withDefault == null) { withDefault = false } |
| 131 | if (withDefault) { |
| 132 | if (this.attributesWithDefaults === undefined) { this.buildAttributesWithDefaults() } |
| 133 | return this.attributesWithDefaults[attribute] |
| 134 | } else { |
| 135 | return super.get(attribute) |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | set (attributes, options) { |
| 140 | if (attributes !== 'thangs') { delete this.attributesWithDefaults } // unless attributes is 'thangs': performance optimization for Levels keeping their cache. |
no test coverage detected