From b473f4fb0fa2283b1a1ec3c089b7c3f74fb15a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sonee=CC=81=20John?= Date: Wed, 19 Feb 2020 11:30:36 -0400 Subject: [PATCH] Add custom -description implementation --- XCDYouTubeKit/XCDURLGetOperation.m | 7 +++++++ XCDYouTubeKit/XCDURLHeadOperation.m | 7 +++++++ XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/XCDYouTubeKit/XCDURLGetOperation.m b/XCDYouTubeKit/XCDURLGetOperation.m index 13adcf26..7bea2436 100644 --- a/XCDYouTubeKit/XCDURLGetOperation.m +++ b/XCDYouTubeKit/XCDURLGetOperation.m @@ -158,4 +158,11 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)dataTask di [self finishWithError:error]; } +#pragma mark - NSObject + +- (NSString *) description +{ + return [NSString stringWithFormat:@"<%@: %p> %@", self.class, self, self.url]; +} + @end diff --git a/XCDYouTubeKit/XCDURLHeadOperation.m b/XCDYouTubeKit/XCDURLHeadOperation.m index 922d8659..a10c15e6 100644 --- a/XCDYouTubeKit/XCDURLHeadOperation.m +++ b/XCDYouTubeKit/XCDURLHeadOperation.m @@ -102,4 +102,11 @@ - (void) cancel self.isFinished = YES; } +#pragma mark - NSObject + +- (NSString *) description +{ + return [NSString stringWithFormat:@"<%@: %p> %@", self.class, self, self.url]; +} + @end diff --git a/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m b/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m index 2a0c991e..1b2bdf29 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m @@ -206,4 +206,11 @@ - (void) finish self.isFinished = YES; } +#pragma mark - NSObject + +- (NSString *) description +{ + return [NSString stringWithFormat:@"<%@: %p> %@", self.class, self, self.video]; +} + @end