# File lib/test/unit/attribute.rb, line 38 def method_added(name) super return unless defined?(@current_attributes) attributes = {} kept_attributes = StringifyKeyHash.new @current_attributes.each do |attribute_name, attribute| attributes[attribute_name] = attribute[:value] if attribute[:keep] keep_hook = attribute[:keep_hook] attribute = keep_hook.call(attribute) if keep_hook kept_attributes[attribute_name] = attribute end end set_attributes(name, attributes) @current_attributes = kept_attributes end