Discussion: Using irb as a REPL
Afficher un message
Vieux 20/11/2007, 00h21   #1
S. Robert James
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Using irb as a REPL

Lisp programmers often use the REPL (similar to IRB) as a simple way
to make an interactive interface to their app. I'd like to do the
same thing with irb - that is, define my classes, and load irb in the
context.

I can get about half way there:

require 'irb'
IRB.start
my_class = MyClass.new(...) # I want this to be the context
irb my_class

....works, but you have to type "quit" to load. Is there a better way
to leverage IRB from within my code? What do the Ruby hackers say? (I
know a lot have a Lisp background, and so wouldn't want Ruby to not
have a REPL shell...)
  Réponse avec citation
 
Page generated in 0,04722 seconds with 9 queries