...

/

Calling

Calling

Learn how to call an object's methods in Ruby!

Calling Methods

In Ruby, methods that belong to (are defined on) objects can be used (called) by adding a dot, and then the method name, like so:

object.method

That’s like saying Hey object, please do [method].

...

Create a free account to access the full course.

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