Skip to content

Instantly share code, notes, and snippets.

@pbjorklund
Created October 16, 2012 09:09
Show Gist options
  • Save pbjorklund/3898204 to your computer and use it in GitHub Desktop.
Save pbjorklund/3898204 to your computer and use it in GitHub Desktop.
class Tester
def test statement, &block
puts "Running test with #{statement}"
block.call
puts "Continuing test"
end
end
tester = Tester.new
tester.test("string param") { puts "Running block" }
➜ ~ ruby test.rb
Running test with string param
Running block
Continuing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment