Instance Vs Class Methods Notes Flashcards
1
Q
what is an instance method?
A
An instance method depends on the attributes or instance variables of an instance.
Class#method_name means method_name is an instance method
2
Q
what is a class method?
A
A class method is a method that is called directly on the class.we define class method by adding [self.] to the front of a method name. Class::method_name means method_name is a class method