regularberry/Awful — pull request #60 by nolanw (2012-05-16 05:24:06+00:00)
Title: mogenerator

[mogenerator](http://rentzsch.github.com/mogenerator/) does some kickass code generation. It reads an xcdatamodel and shits out two sets of classes: a machine class with all the properties and other helpful goodies from the xcdatamodel; and a human subclass that never gets regenerated.

If you have mogenerator installed, the machine classes will get regenerated on every build. If it's not installed, the build will succeed anyway. If you're going to be mucking with the xcdatamodel, I suggest you install mogenerator (`brew install mogenerator` is all you need) so we don't surprise one another with changes to generated code.

One of my many favourite features:

```
someObject.yesOrNo = [NSNumber numberWithBool:YES];
```

becomes

```
someObject.yesOrNoValue = YES;
```

It seems like a small thing but I've bitten myself so many times by doing `if (someObject.yesOrNo)` which evaluates to `true` even if the `boolValue` is `NO`.