railsware/BloodMagic — pull request #5 by 0xc010d (2013-11-11 23:34:58+00:00)
Title: It might be useful to have an ability to exclude some classes from lazy properties instantiation

It was decided to derive `` protocol in subclasses and not to require its mentioning in them. Anyhow, sometimes it might be useful to 'skip' lazy properties instantiation for some classes in this hierarchy. So, from now on it's possible to use `` protocol to do that. All the properties declared in those 'excluded' classes would not be taken into account when we collect `@dynamic` properties for lazy instantiation.

Example usage

```objc
@interface A : NSObject
@property (nonatomic, strong) NSObject *a;
@end

@implementation A
@dynamic a;
@end
```

```objc
@interface B : A
@property (nonatomic, strong) NSObject *b;
@end

@implementation B
@dynamic b;
@end
```

```objc
@interface C : B
@property (nonatomic, strong) NSObject *c;
@end

@implementation C
@dynamic c;
@end
```

In this hierarchy class `A` is defined as lazy so its property `a` would be lazily instantiated. Class `B` would also be lazy (as it derives `` protocol from `A`) so its property `b` would be lazily instantiated as well as inherited property `a`. `C` is defined as `` and inherits `B` so its property `c` **would not** be lazily instantiated while `a` and `b` **would** still be lazily instantiated.