title: Getter/Setter for class variables in Ruby
body: <p>Can getter/setter be auto-generated/enabled for class variables like that are being generated for instance variables using <code>attr_accessor</code>:</p>
  
  <pre><code>class School
    @@syllabus = :cbse
  
    def self.syllabus
      @@syllabus
    end
  
    def self.syllabus=(_)
      @@syllabus = _
    end
  end
  
  School.syllabus = :icse
  School.syllabus # =&gt; :icse
  </code></pre>