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:
parent
8f86e0357c
commit
24cd559082
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue