dir()
or
dir(<some_object>)
and get a list of variables, methods etc that exist for that object.
Also there is help(<some_object>), or help(<some_object.aMethod>).
does ruby have similar functions. I know that you can use ri....but
is there a function to call while in the ruby shell?
thanks
Ruby can't tell you the documentation; there's no docstring like there
is in Python. There are some enhancements to irb available that give
an ri command from within irb.
-austin
--
Austin Ziegler * halos...@gmail.com * http://www.halostatue.ca/
* aus...@halostatue.ca * http://www.halostatue.ca/feed/
* aus...@zieglers.ca
That should give you the same effect; as for the help method, ri is
your only option AFAIK.
--Jeremy
--
http://www.jeremymcanally.com/
My free Ruby e-book:
http://www.humblelittlerubybook.com/book/
My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
Actually, irb can give you documentation. For example :
irb(main):001:0> help Array
It works like ri.
--
Olivier Renaud
--
Cheers,
zimbatm
you can also use local_variables to get a list of... local variables!
Daniel