Ok, so I'm finding it quite difficult to locate documentation for ruby. For instance, I was just trying
f = File.open("some-file.txt","w+")
and then want to check what methods I have available on f after this. I try out the following, just to see what thing I get back from open
ri File.open -> Nothing known about File.open
If I browse to the core docs I learn that File at least doesn't define "open", ok so fine. But the page doesn't mention which modules File mixes in, or inherits from. So I finally write up a small script which runs
p File.open("foo.txt", "w+").methods
which finally delivers the motherload. But this seems quite inefficient (not to mention a raw list of methods isn't the best documentation ever). I know that definitions are all very malleable in Ruby, but how do I best navigate the core docs efficiently? I'm not seeing anything else out there, so I'll assume others have some decent way of navigating them. I'm using Firefox, and the Ctrl+F is global across all frames, making it fairly useless. The seeming lack of any cross-referenced documentation is also bewildering (but maybe it's as good as it gets?) This other SO question is basicly the same, but I'll venture another bump, since it's 10 months old, and the accepted answer isn't really cutting it for me.
What are others doing when curious about what methods are available on some object obtained from the standard classes?