//
//  YSRACScopedDisposable.m
//  ReactiveObjC
//
//  Created by Josh Abernathy on 3/28/12.
//  Copyright (c) 2012 GitHub, Inc. All rights reserved.
//

#import "YSRACScopedDisposable.h"

@implementation YSRACScopedDisposable

#pragma mark Lifecycle

+ (instancetype)scopedDisposableWithDisposable:(YSRACDisposable *)disposable {
	return [self disposableWithBlock:^{
		[disposable dispose];
	}];
}

- (void)dealloc {
	[self dispose];
}

#pragma mark YSRACDisposable

- (YSRACScopedDisposable *)asScopedDisposable {
	// totally already are
	return self;
}

@end
