title: Defining specific attr_accessor methods in order to distinguish several types of instance variables
body: <p>When describing classes, I would like to be able to diffentiate different kind of instance variables, using a dedicated class methods (let's call it my_attrs_1, my_attrs_2). Something like : </p>
  
  <pre><code>class DesignUnit
    attrs_1 :a,:b
    attrs_2 :c  
  end
  </code></pre>
  
  <p>So that I can iterate through these different instance variables like this :</p>
  
  <pre><code>du=DesignUnit.new
  #...
  du.attrs_1.each do ...
     #I get a, and b
  end
  </code></pre>
  
  <p>My starting point is to have a look at how to customize attr_acessor definition (for instance <a href="http://maxivak.com/ruby-metaprogramming-and-own-attr_accessor/" rel="nofollow">here</a>), but I didn't succeed to make it work.</p>