title: How can I update the value of an instance variable?
body: <p>I have a class <code>OrangeTree</code> and a function <code>OneYearPasses</code>. This function is supposed to increment the age and height of a tree by one.</p>
  
  <pre><code>class OrangeTree
    def initialize(height, age)
      @height = height
      @age = age
    end
  
    def age
      @age
    end
  
    def height
      @height
    end
  
    def OrangeHeight
      puts "This Orange tree is #{height} unit  tall"
    end
  
    def OneYearPasses
      age =+ 1
      height =+ 1
      puts "This Orange tree is now #{age} years old and its height is      now #{height}"
    end
  end
  
  FirstOrangeTree = OrangeTree.new(0,0)
  </code></pre>
  
  <p>When I try to increment them, it doesn't save the new values:</p>
  
  <pre><code>orangeOne =  FirstOrangeTree.OneYearPasses
  # &gt;&gt; This Orange tree is now 1 years old and its height is now 1
  orangeOne = FirstOrangeTree.OneYearPasses
  # &gt;&gt; This Orange tree is now 1 years old and its height is now 1
  </code></pre>
  
  <p>I guess it only returns a new copy.</p>
  
  <p>What am I doing wrong?</p>