Calling Methods
Learn how to call an object's methods in Ruby.
Calling methods
In Ruby, methods that are defined on objects can be used by adding a dot and then the method name, like so:
object.method
That essentially instructs an object to perform the method’s behavior.
This is known as calling a method.
For example, the String
class defines methods like:
upcase
(convert the object to uppercase)