Class: Wemux::Pair::Clipboard

Inherits:
Object
  • Object
show all
Defined in:
lib/wemux/pair/clipboard.rb

Class Method Summary collapse

Class Method Details

.copy(input) ⇒ Object



4
5
6
7
8
9
# File 'lib/wemux/pair/clipboard.rb', line 4

def self.copy(input)
  return unless system("which pbcopy")
  str = input.to_s
  IO.popen('pbcopy', 'w') { |f| f << str }
  str
end