Hi,

I am new to Ruby.  This is the very first class I am writing and it
doesn't seem that Ruby is designed to handle what I thought should work.
Why doesn't the below work?

class Song < ActiveRecord::Base
  @@dcounts = []

  def Song.count(difficulty, artistid)
    @@dcounts[difficulty][artistid]
  end

  def Song.count=(difficulty, artistid, val)
    @@dcounts[difficulty] ||= {}
    @@dcounts[difficulty][artistid] = val
  end
end

Song.count(1, 3547) = 10

test.rb:14: parse error, unexpected '=', expecting $
Song.count(1,3547) = 10
                    ^

-- 
Posted via http://www.ruby-forum.com/.