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

Merge pull request #154 from kioopi/patch-1

Update README.md example for lambda functions
This commit is contained in:
Charles Lowell 2012-04-20 09:07:55 -07:00
commit 084c47bc62

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 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 cxt.eval("say('Hello', 3)") #=> HelloHelloHello
embed a ruby object into your scope and access its properties/methods from javascript embed a ruby object into your scope and access its properties/methods from javascript