Hello!
My question is very simple : when I launch IRB, I normally have to rewrite a bunch of methods each time. How could I set IRB in order to automatically include classes and methods I normally write?
Should I create a gem and require it each time?
Hi,
You could simply write a script and require it on startup with the -r parameter:
irb -r C:/myscript.rb
If you write this line into a batch file (or the like), you don’t even have to type it in.
There’s also an initialization file for IRB: http://www.rubycentral.com/pickaxe/irb.html
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.