1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

Update README.md example for lambda functions to reflect changes from 52df3776b0

This commit is contained in:
Vangelis Tsoumenis 2012-04-16 19:52:00 +03:00
parent 8f86e0357c
commit 24cd559082

View file

@ -38,7 +38,7 @@ embed values into the scope of your context
embed ruby code into your scope and call it from javascript
cxt["say"] = lambda {|word, times| word * times}
cxt["say"] = lambda {|this, word, times| word * times}
cxt.eval("say('Hello', 3)") #=> HelloHelloHello
embed a ruby object into your scope and access its properties/methods from javascript