3

I want add alias to my .irbrc similary like

alias q exit

(work).

But I want to run some command, for example

alias cleandb="DatabaseCleaner.clean"

(don't work). How execute this?

Mikhail Grishko
  • 4,258
  • 3
  • 22
  • 21

1 Answers1

2

Reopen the kernel module. Something like the following:

module Kernel

   def q
     exit
   end

end
lucapette
  • 20,564
  • 6
  • 65
  • 59