I'm coming to Ruby from Python, and I'm wondering if Ruby has some equivalent of dir()
in Python that I can use within the IRB. I was looking at this SO thread linked below, where it appears to not be the case, but it's a 6 year old post so I was trying to find out if anything had changed since then.
Ruby Equivalent of Python dir?
objects.methods.sort
is nice, but I want to see things like instance/class variables on an object as well (really everything publicly available in the namespace), not just methods.