lib/clipboard/mac.rb in clipboard-1.2.1 vs lib/clipboard/mac.rb in clipboard-1.3.0
- old
+ new
@@ -1,16 +1,18 @@
-require 'open3'
+# frozen_string_literal: true
+require_relative "utils"
+
module Clipboard
module Mac
extend self
def paste(_ = nil)
`pbpaste`
end
def copy(data)
- Open3.popen3( 'pbcopy' ){ |input, _, _| input << data }
+ Utils.popen "pbcopy", data
paste
end
def clear
copy ''