title: Why is "self" being returned in Ruby
body: <p>I'm following this Ruby tutorial here, and it's talking about Stacks and Queues
  <a href="http://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/33-advanced-arrays/lessons/86-stacks-and-queues#solution4117" rel="nofollow">http://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/33-advanced-arrays/lessons/86-stacks-and-queues#solution4117</a></p>
  
  <p>It gives the following code for a stack</p>
  
  <pre><code>class Stack
    def initialize
      @store = Array.new
    end
  
    def pop
     @store.pop
    end
  
    def push(element)
      @store.push(element)
      self
    end
  
    def size
      @store.size
    end
  end
  </code></pre>
  
  <p>My question is: Why is it necessary to return "self" in the "push" method, but we do not have to return self in say the pop method? What is the distinction here?</p>
  
  <p>Thanks!</p>