title: Constants or class variables in ruby?
body: <p>I've been programming in Ruby for a few months now, and I'm wondering when it is appropriate to use constants over class variables and vice versa. (I'm working in Rails, thinking about constants in models).</p>
  
  <pre><code>class Category
    TYPES = %w(listing event business).freeze
  end
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>class Category
    @@types = %w(listing event business).freeze
    cattr_reader :types
  end
  </code></pre>
  
  <p>Are there circumstances where one is preferable to another? Or is it just a matter of taste/style?</p>