BattleSim/client/app/js/collections/chats/rooms.coffee

10 lines
283 B
CoffeeScript
Raw Normal View History

2016-02-01 22:19:30 +00:00
class @Rooms extends Backbone.Collection
model: Room
# Delegate room events to every single room in this collection.
for eventName in Room::EVENTS
do (eventName) =>
this::[eventName] = (args...) ->
@each (room) ->
room[eventName].apply(room, args)