Automatically setting irb context

I currently have code like this in my .irbrc:

$session = AIMS::Session.new
puts “do ‘irb $session’ to start”

I wanted to put “irb $session” directly in the script, so that irb
would start with $session as the current context, but this didn’t
work.(NoMethodError: undefined method `irb’ for #Object:0x28a9258) So
know i use a puts to remind me to do it manually when i start.

Is there a way to make this happen automatically?

Bret

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs