RailsCasts Pro episodes are now free!

Learn more or hide this

Michael J. Cohen's Profile

GitHub User: mjc

Site: http://325i.org

Comments by Michael J. Cohen

Avatar

I was looking for a good way to explain it, and found this. :)

def self.foo creates a class method.

"Class methods are methods that are called on a class and instance methods are methods that are called on an instance of a class."

via http://www.railstips.org/blog/archives/2009/05/11/class-and-instance-methods-in-ruby/