Sha256: fa5139b2815ee249e7bcd0e97a9cc1a133be57f5d7319a0143319c20ca527660
Contents?: true
Size: 507 Bytes
Versions: 83
Compression:
Stored size: 507 Bytes
Contents
# キャラクターの一覧を表現するコレクション Smalruby.CharacterSet = Backbone.Collection.extend model: Smalruby.Character uniqueName: (costume = Smalruby.Character.PRESET_COSTUMES[0])-> prefix = costume.substring(costume.lastIndexOf('/') + 1).replace(/\.[^.]*$/, '').replace(/[\d]*$/, '') max = 0 r = new RegExp('^' + prefix + '(\\d+)$') _.each @pluck('name'), (name) -> if name.match(r) max = _.max([max, parseInt(RegExp.$1)]) "#{prefix}#{max + 1}"
Version data entries
83 entries across 83 versions & 1 rubygems