title: Ruby class set/get
body: <p>What is wrong with this <code>set/get</code>?</p>
  
  <pre><code>class Pupil
    def name
      @name
    end
  
    def name=(name)
      @name = name
    end
  
    def age
      @age
    end
  
    def age=(age)
      @age
    end
  end
  </code></pre>
  
  <p>Further on the same, if there was a child class with 3 arguments, name, age, sex, would the set get method in the child for sex only. Can you please show the set/get method and initialize in the child class.</p>