codecombat/app/lib/SystemNameLoader.coffee
2014-07-01 12:23:22 +08:00

10 lines
264 B
CoffeeScript

CocoClass = require 'lib/CocoClass'
namesCache = {}
class SystemNameLoader extends CocoClass
getName: (id) -> namesCache[id]?.name
setName: (system) -> namesCache[system.get('original')] = {name: system.get('name')}
module.exports = new SystemNameLoader()