Created
October 16, 2012 09:09
-
-
Save pbjorklund/3898204 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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