Skip to content

Instantly share code, notes, and snippets.

@jeffrafter
Created December 30, 2014 20:23
Show Gist options
  • Save jeffrafter/babfe5e960a712c89088 to your computer and use it in GitHub Desktop.
Save jeffrafter/babfe5e960a712c89088 to your computer and use it in GitHub Desktop.
def say_hello
name = yield # runs the block and captures the output
puts "Hello #{name}"
end
say_hello do
"ellisTAA"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment