-
Notifications
You must be signed in to change notification settings - Fork 270
/
TyphoonDefinition+Option.h
39 lines (25 loc) · 1.27 KB
/
TyphoonDefinition+Option.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
////////////////////////////////////////////////////////////////////////////////
//
// TYPHOON FRAMEWORK
// Copyright 2013, Typhoon Framework Contributors
// All Rights Reserved.
//
// NOTICE: The authors permit you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
#import "TyphoonDefinition.h"
#import "TyphoonOptionMatcher.h"
@protocol TyphoonAutoInjectionConfig;
typedef void(^TyphoonMatcherBlock)(TyphoonOptionMatcher *matcher);
@interface TyphoonDefinition (Option)
/** if boolean 'option' value is YES, then return yesInjection, otherwise return noInjection */
+ (id)withOption:(id)option yes:(id)yesInjection no:(id)noInjection;
/** Returns definition matching 'option', specified in 'matcherBlock' */
+ (id)withOption:(id)option matcher:(TyphoonMatcherBlock)matcherBlock;
+ (id)withOption:(id)option matcher:(TyphoonMatcherBlock)matcherBlock autoInjectionConfig:(void(^)(id<TyphoonAutoInjectionConfig> config))configBlock;
@end
@protocol TyphoonAutoInjectionConfig<NSObject>
@property (nonatomic, strong) id classOrProtocolForAutoInjection;
@property (nonatomic) TyphoonAutoInjectVisibility autoInjectionVisibility;
@end