Sha256: 5dfffa6910b7fd48cd9557f1a92be221cffb44f8a658d3d07dfe84478483861f

Contents?: true

Size: 262 Bytes

Versions: 4

Compression:

Stored size: 262 Bytes

Contents

module Clipboard
  module Cygwin
    extend self

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

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

    def clear
      copy ''
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clipboard-1.2.1 lib/clipboard/cygwin.rb
clipboard-1.2.0 lib/clipboard/cygwin.rb
clipboard-1.1.2 lib/clipboard/cygwin.rb
clipboard-1.1.1 lib/clipboard/cygwin.rb