...

/

Top-level Object

Top-level Object

Learn about the top-level object in Ruby.

We’ve learned that objects come with lots of methods attached to them. We’ve seen how we can use them to do interesting things with the object by way of calling these methods.

Now, try running the following code:

Press + to interact
Ruby
puts is_a?(Object)
#true
puts methods
#[:to_s, :inspect, ... ]

Note: We can use some methods in Ruby ...