Sha256: feca1e73e5eca2ecbb0a72fc594a78a500394b74b0173afa9b834d111ea49cec

Contents?: true

Size: 293 Bytes

Versions: 3

Compression:

Stored size: 293 Bytes

Contents

# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
clipboard-1.3.2 lib/clipboard/cygwin.rb
clipboard-1.3.1 lib/clipboard/cygwin.rb
clipboard-1.3.0 lib/clipboard/cygwin.rb