Created
July 22, 2010 03:32
-
-
Save texel/485528 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
| NSURLConnection.connectionWithRequest(url_request, delegate: ConnectionDelegate.new do |d| | |
| d.success { |data| some_object.do_something_with_data(data) } | |
| d.failure do |data, error| | |
| # we can do something more complex here... and we don't have to look in the delegate class! | |
| some_other_object.do_something_with_error(error) | |
| end | |
| end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment