# File lib/active_record/store.rb, line 31 31: def store(store_attribute, options = {}) 32: serialize store_attribute, Hash 33: store_accessor(store_attribute, options[:accessors]) if options.has_key? :accessors 34: end
# File lib/active_record/store.rb, line 36 36: def store_accessor(store_attribute, *keys) 37: Array(keys).flatten.each do |key| 38: define_method("#{key}=") do |value| 39: send("#{store_attribute}=", {}) unless send(store_attribute).is_a?(Hash) 40: send(store_attribute)[key] = value 41: send("#{store_attribute}_will_change!") 42: end 43: 44: define_method(key) do 45: send("#{store_attribute}=", {}) unless send(store_attribute).is_a?(Hash) 46: send(store_attribute)[key] 47: end 48: end 49: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.