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

Method makeFor

app/models/Purchase.js:20–29  ·  view source on GitHub ↗
(toPurchase)

Source from the content-addressed store, hash-verified

18 }
19
20 static makeFor (toPurchase) {
21 return new Purchase({
22 recipient: me.id,
23 purchaser: me.id,
24 purchased: {
25 original: toPurchase.get('original'),
26 collection: _.string.underscored(toPurchase.constructor.className)
27 }
28 })
29 }
30 }
31 Purchase.initClass()
32 return Purchase

Callers 3

onUnlockButtonClickedMethod · 0.80
onUnlockButtonClickedMethod · 0.80
onUnlockButtonClickedMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected