Skip to content

Instantly share code, notes, and snippets.

@addywaddy
Created October 30, 2009 13:54
Show Gist options
  • Save addywaddy/222349 to your computer and use it in GitHub Desktop.
Save addywaddy/222349 to your computer and use it in GitHub Desktop.
# Define a method for the following:
print_these_strings do
"hello"
"goodbye"
end
# ... which returns "hello and goodbye"
# bonus points:
print_these_strings do
"hello" { "bob" }
"goodbye" { "joe" }
end
# => "hello bob and and goodbye joe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment