Commit e1811bb7 by Dima Bart

Minor style clean up.

parent 56016532
...@@ -32,6 +32,7 @@ NSString * const kShopifyError = @"shopify"; ...@@ -32,6 +32,7 @@ NSString * const kShopifyError = @"shopify";
typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *response, NSError *error); typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *response, NSError *error);
#pragma mark - NSURLResponse - #pragma mark - NSURLResponse -
@interface NSHTTPURLResponse (Convenience) @interface NSHTTPURLResponse (Convenience)
@property (assign, nonatomic, readonly) BOOL successful; @property (assign, nonatomic, readonly) BOOL successful;
...@@ -40,19 +41,13 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse * ...@@ -40,19 +41,13 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
@implementation NSHTTPURLResponse (Convenience) @implementation NSHTTPURLResponse (Convenience)
- (BOOL)successful { - (BOOL)successful
{
return ((NSUInteger)(self.statusCode / 100)) == 2; return ((NSUInteger)(self.statusCode / 100)) == 2;
} }
@end @end
#pragma mark - BUYOperation Private -
@interface BUYOperation (Private)
- (void)setExecuting:(BOOL)executing;
- (void)setFinished:(BOOL)finished;
@end
#pragma mark - BUYRequestOperation - #pragma mark - BUYRequestOperation -
@interface BUYRequestOperation () @interface BUYRequestOperation ()
...@@ -65,7 +60,9 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse * ...@@ -65,7 +60,9 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
@implementation BUYRequestOperation @implementation BUYRequestOperation
#pragma mark - Init - #pragma mark - Init -
+ (instancetype)operationWithSession:(NSURLSession *)session request:(NSURLRequest *)request payload:(id<BUYSerializable>)payload completion:(BUYRequestOperationCompletion)completion {
+ (instancetype)operationWithSession:(NSURLSession *)session request:(NSURLRequest *)request payload:(id<BUYSerializable>)payload completion:(BUYRequestOperationCompletion)completion
{
return [[[self class] alloc] initWithSession:session request:request payload:payload completion:completion]; return [[[self class] alloc] initWithSession:session request:request payload:payload completion:completion];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment