# File lib/dm-sweatshop/support/class_attributes.rb, line 40 def self.accessor(klass, *attributes) self.reader(klass, *attributes) self.writer(klass, *attributes) end
# File lib/dm-sweatshop/support/class_attributes.rb, line 4 def self.reader(klass, *attributes) attributes.each do |attribute| klass.class_eval( unless defined? @@#{attribute} @@#{attribute} = nil end def self.#{attribute} @@#{attribute} end def #{attribute} @@#{attribute} end, __FILE__, __LINE__ + 1) end end
# File lib/dm-sweatshop/support/class_attributes.rb, line 22 def self.writer(klass, *attributes) attributes.each do |attribute| 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) end end
Generated with the Darkfish Rdoc Generator 2.