…es and #attribute method - specs updated
Disallow mutation of ValueObjects via #attributes=
* Increases consistency as mutations on value objects should be created via #with(mutations).
* This solution should also work for jruby, rbx etc.
* As defaults are lazy-set on first access, accessing a attribute with a default on a previously frozen object blows up without this patch. * I choose not to call #get_attributes as this creates an wasted attribute hash.
* A fix will be in next commit to allow easy testing.
Replace AttributesAccessor with AttributeSet.
This way the methods for accessing a set of Attributes are together with those Attributes.
Fixed example for Virtus::ClassMethods#attribute_set.
* Add YARD docs for the private methods
* Change Virtus::Attribute instances to be comparable using equalizer.
* Make sure the deprecation warning is returned
* Change ValueObejct#attribute to pass-through some arguments
* When a module includes Virtus, and then is included into another module an error was thrown.