Project

snarl

0.0
No commit activity in last 3 years
No release in over 3 years
Snarl is JavaScript in disguise, bridging Ruby and Rhino. JRuby required.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 1.2.9
 Project Readme

Snarl¶ ↑

Snarl is JavaScript in disguise, bridging Ruby and Rhino. JRuby required.

Synopsis¶ ↑

context = Snarl::JavascriptContext.new
context.eval("1+1") # => 2

context.eval("var increment = function(i){ return i+1 };")
context.eval("increment(3)") # => 4

context.load("/path/to/js/lib.js") # allows use of lib.js

context.put("foo", "bar")
context.get("foo") # => "bar"

Testing¶ ↑

Run “rake”

Copyright © 2009 Jon Crosby. See LICENSE for details.