Skip to content

Instantly share code, notes, and snippets.

@joshnuss
Last active December 16, 2015 18:08
Show Gist options
  • Save joshnuss/5475085 to your computer and use it in GitHub Desktop.
Save joshnuss/5475085 to your computer and use it in GitHub Desktop.
jQuery over ruby in the browser. with mruby and asm.js. Paste code below into http://qiezi.me/projects/mruby-web-irb/mruby.html
# paste me into http://qiezi.me/projects/mruby-web-irb/mruby.html
MrubyJs.window.instance_eval do
if confirm("continue?")
console.log "you chose continue"
food = prompt("What's your favourite food?")
alert "Really?? #{food}?\nThat's gross."
jQuery('body').prepend("<h1>Likes #{food}</h1>")
else
console.log "you chose not to coninue"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment