Skip to content

jcrosby/snarl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

JavaScript in Disguise

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages