This is a sample project using Opal (https://github.com/opal) and a small Ruby script of my own that has been tested to work. For more info on the Opal framework, see: (http://opalrb.org/).
For some background on opal-basic-sample, see: (http://abowhill.github.io/posts/2013/opal-scripting/)