How do I best navigate the core docs? What are others doing when curious about what methods are available on standard classes?
This other SO question is the same, but the accepted answer isn’t cutting it for me.
I was trying
f = File.open("some-file.txt","w+")
and then wanted to check what methods I have available on f after this. I tried the following:
ri File.open -> Nothing known about File.open
The core docs tells that File at least doesn’t define “open”. But the page doesn’t mention which modules File mixes in, or inherits from. So I wrote a script:
p File.open("foo.txt", "w+").methods
But this seems quite inefficient (not to mention a raw list of methods isn’t the best documentation).
I used pickaxe. It wasn’t the be all and end all, but it was pretty decent.
Now I guess it would have to be http://ruby-doc.org