blob: 91115be5efbc486b3591962a2f3b2f8a406391d8 [file] [log] [blame] [edit]
//
// RACScopedDisposable.m
// ReactiveCocoa
//
// Created by Josh Abernathy on 3/28/12.
// Copyright (c) 2012 GitHub, Inc. All rights reserved.
//
#import "RACScopedDisposable.h"
@implementation RACScopedDisposable
#pragma mark Lifecycle
+ (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable {
return [self disposableWithBlock:^{
[disposable dispose];
}];
}
- (void)dealloc {
[self dispose];
}
#pragma mark RACDisposable
- (RACScopedDisposable *)asScopedDisposable {
// totally already are
return self;
}
@end