title: What is the best way to create alias to attributes in Ruby?
body: <p>What is the best way to create an alias to a instance atribute in Ruby (I'm not using rails or any ruby gem, just, Ruby).<br>
  For example given the class below, how can I create an alias to the <code>:student_name</code> attribute accessors?</p>
  
  <pre><code>class Student
    attr_accessor :student_name
    alias :name :student_name    #wrong
  end
  
  s = Student.new
  s.student_name = "Jordan"
  puts s.name  # --&gt; Jordan
  s.name = "Michael" # --&gt; NoMethodError: undefined method `name=' for #&lt;Student:0x572394&gt; ...
  </code></pre>
  
  <p>Thank's guys!</p>