[holy ruby programmers batman!] Changes made in the last week

Markus Prinz markus.prinz at qsig.org
Sun Jan 13 17:57:25 EST 2008

On 13.01.2008, at 23:31, Giles Bowkett wrote:

> It all sounds awesome, except what's this part mean?
>> .) The Clipboard class and the pastie, google and
>> amazon_upload_shortcut now are only available at the top level if  
>> they
>> are loaded inside IRB

Well, currently they all reside inside the UtilityBelt-Module (and  
their own modules/classes). When loaded, they check wether they are  
loaded inside an IRB-Environment and then, for example, mix themselves  
into Object so you can write "google some query" from the IRB prompt.

The reason I did this was because I thought someone might want to use  
some of the gadgets in their own programs. Granted, amazon, pastie and  
google are probably not something that's of much use in a program, but  
other things like HashMath, the Clipboard (as soon as it works across  
platforms), and Reginald Braithwaite's String#to_proc are things you  
might want to use. Putting everything inside their own modules allows  
you to use them in any way you see fit, and they don't pollute the top  
level/global namespace (unless you're in IRB of course, where it makes  

regards, Markus

PS: Sorry, maybe I should have posted this idea to the mailing list  
before implementing it.

More information about the Utilitybelt-tinkering mailing list