These are chat archives for opal/opal

Dec 2014
Ryan Stout
Dec 30 2014 23:05
I'm sure someone has asked this before, but is there a way I can call a JS func from opal and pass a block as a function?
Luke Barbuto
Dec 30 2014 23:54
Are you talking about passing a ruby block as an argument to a javascript function that should treat the block like a function? something like this?
b = proc { return 'hi' }
` f = function(block) { console.log(block()) }; f(b) `
because as far as I can see blocks just get compiled to functions