title: ruby access static variable
body: <pre><code>class A
    @@ololo = 1
  end
  
  A::ololo
  A.new.ololo
  NoMethodError: undefined method `ololo'
  </code></pre>
  
  <p>okey. I need an attr_reader</p>
  
  <pre><code>class B
    @@ololo = 1
    attr_reader :ololo
  end
  
  A::ololo
  NoMethodError: undefined method `ololo'
  A.new.ololo
  =&gt; nil
  </code></pre>
  
  <p>wtf? is there any limit for ruby accessors?</p>
  
  <pre><code>class C
    @@ololo = 1
    def self.ololo
      @@ololo
    end
    def ololo
      @@ololo
    end
  end
  
  C::ololo
  =&gt; 1
  C.new.ololo
  =&gt; 1
  </code></pre>
  
  <p>Ruby men usually say "yeah! pretty good!". is this pretty good?
  <strong>Can anyone provide shorter code?</strong></p>