# File lib/dm-sweatshop/support/class_attributes.rb, line 40 40: def self.accessor(klass, *attributes) 41: self.reader(klass, *attributes) 42: self.writer(klass, *attributes) 43: end
# File lib/dm-sweatshop/support/class_attributes.rb, line 4 4: def self.reader(klass, *attributes) 5: attributes.each do |attribute| 6: klass.class_eval( unless defined? @@#{attribute} @@#{attribute} = nil end def self.#{attribute} @@#{attribute} end def #{attribute} @@#{attribute} end, __FILE__, __LINE__ + 1) 7: end 8: end
# File lib/dm-sweatshop/support/class_attributes.rb, line 22 22: def self.writer(klass, *attributes) 23: attributes.each do |attribute| 24: klass.class_eval( unless defined? @@#{attribute} @@#{attribute} = nil end def self.#{attribute}=(obj) @@#{attribute} = obj end def #{attribute}=(obj) @@#{attribute} = obj end, __FILE__, __LINE__ + 1) 25: end 26: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.