#import "RoomBoomEvent.h" @implementation RoomBoomEvent + (instancetype)eventWithData:(id)data type:(BoomEventType)type priority:(BoomEventPriority)priority { RoomBoomEvent *event = [[RoomBoomEvent alloc] init]; event.eventData = data; event.type = type; event.priority = priority; event.timestamp = [[NSDate date] timeIntervalSince1970]; return event; } - (NSString *)description { return [NSString stringWithFormat:@"<%@: %p> type: %ld, priority: %ld, timestamp: %f, data: %@", NSStringFromClass([self class]), self, (long)self.type, (long)self.priority, self.timestamp, self.eventData]; } @end