documentation question (ri and binding vs. get_binding vd getBinding)

J

john peter

--0-631621381-1144091890=:57765
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

I was reading up on ERB documentation and a snippet on rhtml
requiring the use of Object.get_binding caught my attention:

...
rhtml =3D ERB.new("someTemplate")
rhtml.run(someObject.get_binding)
...

Curious about tools I have at my disposal to learn more about things
I don't know about Ruby, i typed the following into my DOS console:

ri get_binding

and got the following disappointing message:

Nothing known about get_binding

Since I know that Object "inherits" from Kernel, I did an ri Kernel,
and saw the documentation for binding, which referred me to the Binding c=
lass
for more info. With those steps, I got a better understanding of binding=
,
BUT i do have the following questions:

(1) where did the get prefix convention come from?
(2) how would a newbie know that the get prefix is required (i'm assuming=
it is
because the code examples would have said something else otherwise?)
(3) where else does this "convention" apply to?

also, i noticed that ri as it's currently setup in my environment (ruby 1=
8.4 RC1
for Windows, Rails 1.1) only provides info on Ruby classes, modules, and =
methods and provides no help at all for Rails stuff. I do know about
http://api.rubyonrails.com, BUT i was just wondering:

(4) is there anything I can do to get Rails usage help within my local en=
vironment?

finally, i come from a java background and java IDEs have matured to a po=
int
where i can get code assists and follow links to classes and methods to g=
et contextual help on those classes and methods. For Ruby, I've been usi=
ng RADRails but it doesn't seem to offer a lot of such conveniences (othe=
r than making ri available within the IDE). So my final question is:=20

(5) what tools can you recommend for a Ruby/RoR on Windows environment?

Thank you for any help!




=09
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,279
Latest member
LaRoseDermaBottle

Latest Threads

Top