[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

documentation question (ri and binding vs. get_binding vd getBinding

john peter

4/3/2006 7:18:00 PM

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

...
rhtml = 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 class
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 18.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.rubyo..., BUT i was just wondering:

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

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

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

Thank you for any help!





---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.
1 Answer

Frank Rizzo

9/4/2008 3:49:00 PM

0

On Sep 3, 11:39 pm, "None O' Yer Bidness" <B...@wh.net> wrote:
> "Frank Rizzo" <champ91...@yahoo.com> wrote in message
>
> news:6b77bdcf-c5e2-4de3-9a02-1f24f5f7c025@z6g2000pre.googlegroups.com...
>
> > On Sep 3, 10:17 pm, Tiger Luck <Tiger_Luck@nature_preserve.afr> wrote:
> >> "Oh, yeah... that's the stuff! Pregnant teeny-bobber! Give it up for
> >> Grampa, sweetcheeks!"
>
> > Is that all you got? Seriously, that is the best thing you can come
> > up with at this time?
>
> > Rizzo
>
> Actually Palin is an empty vessel with nothing.

Funny, I've been hearing that about your man Obama for months. I feel
that way about him.

> Her appeaarence at the small GOP gathering will be forgotten tomarrow.