codecombat/app/lib/SystemNameLoader.coffee

11 lines
262 B
CoffeeScript
Raw Normal View History

CocoClass = require './CocoClass'
2014-04-18 16:02:14 -04:00
namesCache = {}
class SystemNameLoader extends CocoClass
getName: (id) -> namesCache[id]?.name
2014-06-30 22:16:26 -04:00
setName: (system) -> namesCache[system.get('original')] = {name: system.get('name')}
2014-04-18 16:02:14 -04:00
module.exports = new SystemNameLoader()