REPL console screen

REPL console screen
REPL console screen. Click to enlarge.

Ruby Jard's REPL engine is powered by Pry, a runtime developer console with powerful introspection capabilities. There are plenty of things you can do with the REPL console:

  • Ad-hoc code execution
  • Inspect nested variables (supports syntax highlighting)
  • Source code browsing
  • Document browsing
  • Command shell integration
  • Navigation around state
  • Interfere with and change current object state

To make use of all advanced features, please read the Pry documentation.

Some tips to work with the Jard REPL console effectively:

  • Ruby Jard intercepts the return value after evaluating your input, and performs decoration.
  • Therefore, syntax highlighting doesn't work with puts. Instead of printing a complicated object into STDOUT, just type a the name of a variable or method call, then press enter.
Don't use puts
Don't use puts. Click to enlarge.

  • When you type a lot, the terminal will become "scrolled" down. You can always scroll out, or use list to clear screen, and bring back the UI.
  • If there is too much output, Ruby Jard triggers a pager (less by default). You can navigate around the pager with the usual hjkl key bindings. Press q to return to the debugging interface.