Skip to content

Instantly share code, notes, and snippets.

@BitOfUniverse
Last active March 7, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BitOfUniverse/8a323545a11ddddc8f5ed9039acba486 to your computer and use it in GitHub Desktop.
Save BitOfUniverse/8a323545a11ddddc8f5ed9039acba486 to your computer and use it in GitHub Desktop.
Ruby IIFE
# def returns symbol
# 1
send def me; puts "iffy" end
# 2
method(def me; puts "iffy" end).call
# 3
(->{ puts "iffy" }).()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment