def set_attributes(method_name, new_attributes)
return if new_attributes.empty?
method_name = normalize_method_name(method_name)
@attributes_table ||= {}
@attributes_table[method_name] ||= {}
current_attributes = @attributes_table[method_name]
new_attributes.each do |key, value|
key = normalize_attribute_name(key)
observers = attribute_observers(key) || []
observers.each do |observer|
observer.call(self,
key,
(attributes(method_name) || {})[key],
value,
method_name)
end
current_attributes[key] = value
end
end