.irbrc location/path

Hi all,

I want to place .irbrc config file in a folder in /tmp or any other
folder other than under /home and point my $IRBRC environment variable
to
this location.
Is this possible??

From the init.rb file, I found the following code snippet:

enumerate possible rc-file base name generators

def IRB.rc_file_generators
if irbrc = ENV[“IRBRC”]
yield proc{|rc| rc == “rc” ? irbrc : irbrc+rc}
end
if home = ENV[“HOME”]
yield proc{|rc| home+"/.irb#{rc}"}
end
home = Dir.pwd
yield proc{|rc| home+"/.irb#{rc}"}
yield proc{|rc| home+"/irb#{rc.sub(/\A_?/, ‘.’)}"}
yield proc{|rc| home+"/_irb#{rc}"}
yield proc{|rc| home+"/$irb#{rc}"}
end

Could somebody please help me understand the above method? Can .irbrc be
stored in folders other than home, like in /tmp or in /root etc…?

Thanks in advance,

Regards,
Narayanan