Sha256: 08ee0b89fe3ea5a89f391a846400b5f9bfd3ee0fb827fa3a66f39ccb6ebaca9a

Contents?: true

Size: 271 Bytes

Versions: 9

Compression:

Stored size: 271 Bytes

Contents

# frozen_string_literal: true

require_relative "utils"

module Clipboard
  module Mac
    extend self

    def paste(_ = nil)
      `pbpaste`
    end

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

    def clear
      copy ''
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
clipboard-1.4.1 lib/clipboard/mac.rb
clipboard-1.4.0 lib/clipboard/mac.rb
clipboard-1.3.6 lib/clipboard/mac.rb
clipboard-1.3.5 lib/clipboard/mac.rb
clipboard-1.3.4 lib/clipboard/mac.rb
clipboard-1.3.3 lib/clipboard/mac.rb
clipboard-1.3.2 lib/clipboard/mac.rb
clipboard-1.3.1 lib/clipboard/mac.rb
clipboard-1.3.0 lib/clipboard/mac.rb