clayallsopp/geomotion — pull request #11 by colinta (2013-07-28 18:12:00+00:00)
Title: added the 'margin/height' option to 'CGRect#below', and more specs

Creating a PR for transparency, but this one is easy. Just adds a missing method signature to `CGRect#below` and plushes out the specs for those.

I know you're not hacking much on geomotion these days, but I was thinking of adding methods to create rects that are *inside* the current target. Something like this:

```
parent = CGRect.make(x: 10, y: 10, width: 100, height: 100)
child1 = parent.from_top(height: 20) # => [[10, 10], [100, 20]]
child2 = parent.from_bottom(width: 50, height: 20) # => [[35, 10], [50, 20]]
child3 = parent.relative.from_bottom(width: 50, height: 20) # => [[25, 10], [50, 20]]
child3 = parent.relative.from_bottom_right(width: 50, height: 20) # => [[50, 10], [50, 20]]
```

So the methods would anchor to a corner, and you could grow the rect from that corner by passing width/height options.

```
from_top_left
from_top
from_top_right
from_left
from_center
from_right
from_bottom_left
from_bottom
from_bottom_right
```

I will probably add this in a future version.