Class: MacClipboard

Inherits:
Object show all
Defined in:
lib/mac_clipboard.rb

Overview

Class Method Summary collapse

Class Method Details

.readObject



7
8
9
# File 'lib/mac_clipboard.rb', line 7

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

.write(stuff) ⇒ Object



10
11
12
# File 'lib/mac_clipboard.rb', line 10

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