Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (26 sloc) 0.656 kb
#import "JSObjectionProviderEntry.h"
@implementation JSObjectionProviderEntry
- (id)initWithProvider:(id<JSObjectionProvider>)theProvider {
if ((self = [super init])) {
_provider = [theProvider retain];
}
return self;
}
- (id)initWithBlock:(id(^)(JSObjectionInjector *context))theBlock {
if ((self = [super init])) {
_block = [theBlock copy];
}
return self;
}
- (id)extractObject:(NSArray *)arguments {
if (_block) {
return _block(self.injector);
}
return [_provider provide:self.injector];
}
- (void)dealloc {
[_provider release];
[_block release];
[super dealloc];
}
@end
Jump to Line
Something went wrong with that request. Please try again.