Class: IORB::Util::MacClipboard

Inherits:
Object
  • Object
show all
Defined in:
lib/iorb.rb

Overview

Class Method Summary collapse

Class Method Details

.readObject



11
12
13
# File 'lib/iorb.rb', line 11

def read
  IO.popen('pbpaste') {|clipboard| clipboard.read}
end

.write(stuff) ⇒ Object



14
15
16
# File 'lib/iorb.rb', line 14

def write(stuff)
  IO.popen('pbcopy', 'w+') {|clipboard| clipboard.write(stuff)}
end