title: When using a private attr_accessor, why does self.attribute= work, but self.attribute doesn't?
body: <p>Suppose I have a class where I define an <code>attr_accessor</code> like so:</p>
  
  <pre><code>private
  
  attr_accessor :attribute
  </code></pre>
  
  <p>I understand why using the <code>self.attribute</code> reader method doesn't work - in Ruby you can't call a private method on an explicit receiver.</p>
  
  <p>What I'm confused by is why doesn't this rule apply to the writer? Why can I call <code>self.attribute = 1</code>, and that doesn't throw any access violation errors?</p>