(Sorry, I messed up #24 by pushing additional commits to this branch, which should be considered separately for inclusion. I force-pushed to remove them, but for some reason the commit in that pull request was also removed)
I've added support for a :default option to attribute declarations. This makes it easy to declare default values, without requiring you to write initialize functions that set them. When working with an XML schema, these :default values can nicely reflect the 'default' declarations in the XSD.
Our use case is we generate classes that include HappyMapper from information parsed from an XSD. With this extension we can easily add a :default => 'some_value' to the generated attribute :foo, String lines, based on the default declarations parsed from the XSD. However, it seems like something that may more generally be considered useful.
Support for default attribute values
Added a :default option to attribute declarations, which result in a
default value being set on objects. This default value will not be
included in generated XML.
This require breaks the build. It should be require 'spec_helper'
Fixed and merged