Created
February 19, 2012 10:17
-
-
Save happyrobots/1862963 to your computer and use it in GitHub Desktop.
Copy to Clipboard Using Ruby
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
# Mac | |
IO.popen('pbcopy', 'r+') { |clipboard| clipboard.puts html_out } | |
# Linux | |
IO.popen(’xsel –clipboard –input’, ‘r+’) { |clipboard| clipboard.puts html_out } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great!