Module: Valued::Mutable::ClassMethods

Defined in:
lib/valued/mutable.rb

Instance Method Summary collapse

Instance Method Details

#attributes(*attributes) ⇒ Object



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

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