Skip to content

Instantly share code, notes, and snippets.

@isaacsanders
Created January 4, 2012 15:55
Show Gist options
  • Save isaacsanders/1560659 to your computer and use it in GitHub Desktop.
Save isaacsanders/1560659 to your computer and use it in GitHub Desktop.
Ruby Under
class File
instance_eval do
:open.is_inverse_of(:close)
end
end
File.under(:open, *open_args) do |file|
# do stuff to the file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment