title: attr_accessor on class variable
body: <pre><code>class User 
    class &lt;&lt; self
      attr_reader :passwordManagerAccountID
      attr_reader :masterPassword
  
      def session(passwordManagerAccountID , masterPassword)
        @@passwordManagerAccountID = passwordManagerAccountID
        @@masterPassword = masterPassword
      end
    end  
  end
  
  User.session("sdsd" , "sdsd")
  User.passwordManagerAccountID #=&gt; no output
  User.masterPassword #=&gt; no output
  </code></pre>
  
  <p>I am trying to use <code>attr_reader</code> on class variable but it doesn't seem to work.</p>
  
  <p>I google searched but I don't seem to understand. So, if someone can explain me in simple terms the problem and its solution (<strong>without using getter and setter methods</strong>).</p>