solnic/virtus — pull request #57 by emmanuel (2012-01-11 18:05:13+00:00)
Title: Introduce Attribute.update_options to give Attributes access to the raw type arg

Actually, I think this could be better handled by adding the raw type arg to the signature of `Attribute#initialize`, since that's really what this is for: allowing the Attribute to consider the raw type in its configuration.

Externalizing this logic (as I've done in this branch) does have the advantage of allowing `Attribute#initialize` to stay simple.

Either way, something like this—allowing Attribute subclasses to consider the raw type arg provided to `ClassMethods#attribute`—is needed in several cases: `EmbeddedValue` (as dealt with here) as well as `SumType` and collection member type (both of which I'm working on, which is what it brought this to my attention).

Opening early to start a discussion.