[OpenStruct](http://www.ruby-doc.org/stdlib-2.0/libdoc/ostruct/rdoc/OpenStruct.html#method-i-5B-5D) is actually perfect for this. Until Ruby 2.0 it didn't offer support for `[]` accessors, but otherwise it handles everything here quite smoothly. (I'll probably reimplement this using that, just to reduce the code exposure.)