add query and body support to ruby

- added an == override to make testing easier
- make reference API a bit more idomatic