Pertaining to Ruby, can someone state the relationship between Class, Objects, and Methods in layman’s terms? And maybe even give an analogy?
New to OOP and trying to grasp the concept.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
note: OOP is independent of Ruby.
Classes are like recipes.
Objects are the actual food you prepare from a recipe.
Methods are … don’t really fit in this metaphor. But they are the behaviors an object can perform. Some might say methods are the messages an object will respond to.