Sha256: b2dded85178290149f90f1bdcf625f64caae1785a8d834808a25642dd4733c10

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

#import "YapNull.h"


@implementation YapNull

static YapNull *singleton;

+ (void)initialize
{
	static BOOL initialized = NO;
	if (!initialized)
	{
		initialized = YES;
		singleton = [[YapNull alloc] init];
	}
}

+ (id)null
{
	return singleton;
}

- (id)init
{
	NSAssert(singleton == nil, @"Must use singleton via [YapNull null]");
	
	#ifdef NS_BLOCK_ASSERTIONS
	if (singleton != nil) return nil;
	#endif
	
	self = [super init];
	return self;
}

@end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
motion-yapper-0.0.3 vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m
motion-yapper-0.0.2 vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m