jruby -S k9 live drawolver # update 4 Feb 2014 (default to using installed jruby)In this case I need to use `jruby -S` because for my pry-branch I specify use of java engine (on reflection I don't think this is important)
Running JRubyArt in live mode (note use $app to access sketch) |
What good it is, is best tested by pry afficianados, however it also occured to me that there is an alternative way of introducing/using pry. If you start a sketch in the "watch" mode you can edit the live sketch to:-
require 'pry' # and where you want the break binding.pryThis also works but again I'm no pry afficianado, so I will leave it to them to decide how best to proceed, but in this scenario you could edit the sketch either from pry, or with an independent editor (tested with vim for both in my case). See below, here I found I was able to set the @back variable directly (no need to call $app). In this I started the sketch in the watch mode, and edited in vim (right-hand terminal, with and unusual white background for me!!)
Now this is slightly interesting, instead of continuing to type $app in the pry repl, you can assign to app `binding = $app`. Then just carry on as though you are editing a regular ruby sketch...
No comments:
Post a Comment