Created
October 31, 2012 12:40
-
-
Save Ball/3986836 to your computer and use it in GitHub Desktop.
Revisions
-
Ball created this gist
Oct 31, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ def using(object, message, *args) begin yield if block_given? ensure object.send(message, *args) end obj = SomthingToClose.connect records = [] using(obj, :close) do records = obj.get_all_the_things process(records) end