Created
October 14, 2011 13:05
-
-
Save code-later/1287041 to your computer and use it in GitHub Desktop.
Put something in OS X system clipboard from your IRB session
This file contains 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
def pbcopy(input) | |
IO.popen("pbcopy", "r+") do |clipboard| | |
clipboard << input | |
end | |
return input | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment