module HTTParty::ModuleInheritableAttributes::ClassMethods
def inherited(subclass)
def inherited(subclass) super @mattr_inheritable_attrs.each do |inheritable_attribute| ivar = :"@#{inheritable_attribute}" subclass.instance_variable_set(ivar, instance_variable_get(ivar).clone) if instance_variable_get(ivar).respond_to?(:merge) method = <<-EOM def self.#{inheritable_attribute} duplicate = ModuleInheritableAttributes.hash_deep_dup(#{ivar}) #{ivar} = superclass.#{inheritable_attribute}.merge(duplicate) end EOM subclass.class_eval method end end end