MCPcopy Create free account
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/core/treema-ext.js:619–630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

617 }
618
619 constructor () {
620 super(...arguments)
621 this.search = this.search.bind(this)
622
623 // to dynamically build the search url, inspect the links url that should be included
624 const links = this.workingSchema.links || []
625 const link = (Array.from(links).filter((l) => l.rel === 'db'))[0]
626 if (!link) { return }
627 const parts = (Array.from(link.href.split('/')).filter((p) => p.length))
628 this.url = `/db/${parts[1]}`
629 this.model = require('models/' + (link.model || _.string.classify(parts[1])))
630 }
631
632 buildValueForDisplay (valEl, data) {
633 const val = data ? this.formatDocument(data) : 'None'

Callers

nothing calls this directly

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected