Module: Clipboard::Wsl

Extended by:
Wsl
Included in:
Wsl
Defined in:
lib/clipboard/wsl.rb

Instance Method Summary collapse

Instance Method Details

#clearObject



18
19
20
# File 'lib/clipboard/wsl.rb', line 18

def clear
  copy ''
end

#copy(data) ⇒ Object



13
14
15
16
# File 'lib/clipboard/wsl.rb', line 13

def copy(data)
  Utils.popen "clip.exe", data
  paste
end

#paste(_ = nil) ⇒ Object



9
10
11
# File 'lib/clipboard/wsl.rb', line 9

def paste(_ = nil)
  `powershell.exe -Command Get-Clipboard`
end