solnic/virtus — Issue #61: Initializing attributes by default
Author: joevandyk
Created: 2012-02-09 18:20:37+00:00
State: open

Is it possible to get virtus to do something like:

```
require 'virtus'

class Address
include Virtus
attribute :street, String
attribute :city, String
end

class User
include Virtus
attribute :name, String
attribute :address, Address
end

u = User.new
fail unless "" == u.name
fail unless "" == u.address.city
```

I'm building a form handling library based on virtus, and not having to deal with nil's would make this a lot easier.