During the context of mutating Attribute objects, I have no access to the attribute DSL provided by Virtus::Extensions, but I do have access to AttributeSet. Therefore, I need a way to either reconstruct a new Attribute instance based on extracted values (name, type and options) from an existing Attribute, or to "clone" an Attribute and then change its name.
Hi,
Whilst developing Datamappify, I need to 'mutate' a few Virtus::Attribute instances - basically change their name.
In Virtus 0.5.x I did the evil thing of changing Virtus::Attribute's internel state. In 1.0 however, this is no longer possible.
During the context of mutating Attribute objects, I have no access to the
attribute
DSL provided by Virtus::Extensions, but I do have access to AttributeSet. Therefore, I need a way to either reconstruct a new Attribute instance based on extracted values (name, type and options) from an existing Attribute, or to "clone" an Attribute and then change its name.Any ideas of how I could accomplish this? :)
Thanks!