Module: Valued::ClassMethods

Defined in:
lib/valued.rb

Instance Method Summary collapse

Instance Method Details

#attributes(*attributes) ⇒ Object



6
7
8
9
10
# File 'lib/valued.rb', line 6

def attributes(*attributes)
  attributes.each { |attribute| self.class_eval { attr_reader attribute } }
  define_method('_attributes') { attributes }
  private :_attributes
end