codecombat/app/lib/SystemNameLoader.coffee

11 lines
263 B
CoffeeScript
Raw Normal View History

2014-04-18 16:02:14 -04:00
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()