Getting Started with Classes

Learn about writing classes.

We'll cover the following

Writing classes

We’re now finally ready for our own classes. Because nearly everything’s an object in Ruby, we’ve worked with objects quite a bit.

We’ve created numbers and strings, and we’ve seen objects like true, false, and nil. We’ve also looked at their class names by calling, "a string".class, and we’ve explored some other methods that these objects have. We’ve also learned how we can define our own methods and how we can call them, passing arguments as required.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy