Module: Clipboard::Cygwin

Extended by:
Cygwin
Included in:
Cygwin
Defined in:
lib/clipboard/cygwin.rb

Instance Method Summary collapse

Instance Method Details

#clearObject



16
17
18
# File 'lib/clipboard/cygwin.rb', line 16

def clear
  copy ''
end

#copy(data) ⇒ Object



11
12
13
14
# File 'lib/clipboard/cygwin.rb', line 11

def copy(data)
  ::File.open("/dev/clipboard", "w"){ |f| f.write(data) }
  paste
end

#paste(_ = nil) ⇒ Object



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

def paste(_ = nil)
  ::File.read("/dev/clipboard")
end