I\'ve been just going through PragProg Continuous Testing With Ruby, where they talk about invoking IRB in context of current class to inspect the code
This will start an IBR REPL where you will have the correct value for self and you will be able to access all local variables and instance variables that are in scope. Type Ctrl+D or quit in order to resume your Ruby program.