MCPcopy Index your code
hub / github.com/codecombat/codecombat / get

Method get

app/models/CocoModel.js:129–137  ·  view source on GitHub ↗
(attribute, withDefault)

Source from the content-addressed store, hash-verified

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.

Callers 9

validateMethod · 0.95
saveMethod · 0.95
isPublishedMethod · 0.95
publishMethod · 0.95
hasReadAccessMethod · 0.95
hasWriteAccessMethod · 0.95
getOwnerMethod · 0.95
watchingMethod · 0.95

Calls 1

Tested by

no test coverage detected