remiprev/her — pull request #98 by dlorson (2013-04-17 16:13:37+00:00)
Title: Support for custom class mapping

You can specify a custom subclass that should be used to map the parsed data to a Ruby object, e.g. instantiate a SpecialPerson instead of Person based on the data hash `type` attribute:

```ruby
class Person
include Her
def self.class_for_data(data)
data[:type] == "special" ? SpecialPerson : self
end
end

class SpecialPerson
end
```

This is useful when mapping associations where the destination object(s) is based on a class hierarchy (e.g. STI)

Let me know if the style and spec coverage are sufficient.