Class function vs. object function

Hi - I want to define a customized finding method on a class, that is
accessible to the class, not just the object, just like you can say
Class.find(:all) for ActiveRecord without needing an instance of
Class.

So, I might want to do something like:

def specials
find(… these would be the find parameters) #does this call
Class.find?
end

def popular
find(… again, particular find params)
end

I tried this, but I cannot call the methods from the class, it looks
like I need an object. Is there a particular way to declare a class-
level function? If not, does Ruby just assume the programmer is not
doing any object-specific work?

Thanks,
Dino

On Mar 1, 2008, at 8:25 PM, dino d. wrote:

Class.find?

Thanks,
Dino

class Movie
def self.popular(options = {})
Movie.find(:all, options.merge({:conditions = “review_count >
100”}))
end
end