module Paperclip::Ext::Class::Hook
Public Instance Methods
inherited(base)
click to toggle source
Calls superclass method
# File lib/dm-paperclip/ext/class.rb, line 26 def inherited(base) super attributes = ::Paperclip::Ext::Class.inheritable_attributes(self) new_attributes = if attributes.equal?(::Paperclip::Ext::Class::EMPTY_INHERITABLE_ATTRIBUTES) ::Paperclip::Ext::Class::EMPTY_INHERITABLE_ATTRIBUTES else attributes.inject({}) do |memo, (key, value)| memo[key] = ::Paperclip::Ext.try_dup(value.dup) memo end end base.instance_variable_set(::Paperclip::Ext::Class::IVar, new_attributes) end