Prevent this constant from being created multiple times
# File lib/dm-paperclip/ext/class.rb, line 3 def self.inheritable_attributes(klass) unless klass.instance_variable_defined?(IVar) klass.instance_variable_set(IVar, EMPTY_INHERITABLE_ATTRIBUTES) end klass.instance_variable_get(IVar) end
# File lib/dm-paperclip/ext/class.rb, line 17 def self.read_inheritable_attribute(klass, key) inheritable_attributes(klass)[key] end
# File lib/dm-paperclip/ext/class.rb, line 21 def self.reset_inheritable_attributes(klass) klass.instance_variable_set(IVar, EMPTY_INHERITABLE_ATTRIBUTES) end
# File lib/dm-paperclip/ext/class.rb, line 10 def self.write_inheritable_attribute(klass, key, value) if inheritable_attributes(klass).equal?(EMPTY_INHERITABLE_ATTRIBUTES) klass.instance_variable_set(IVar, {}) end inheritable_attributes(klass)[key] = value end
Generated with the Darkfish Rdoc Generator 2.