Skip to content

Instantly share code, notes, and snippets.

@crimsonknave
Created February 11, 2015 16:09
Show Gist options
  • Save crimsonknave/a48121c9646b454483db to your computer and use it in GitHub Desktop.
Save crimsonknave/a48121c9646b454483db to your computer and use it in GitHub Desktop.
def example(&block)
puts 'before we call the block'
yield
puts 'after we call the block'
end
example do
puts 'foo'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment