Sha256: 98d96b3115450e1045b3f34b6a2c1803ea039432cfca580b365472bfc5add102

Contents?: true

Size: 338 Bytes

Versions: 10

Compression:

Stored size: 338 Bytes

Contents

module Pennyworth
  module Kits
    # Provides OSX clipboard utility methods.
    class Clipboard

      # Copies text to the OSX clipboard.
      # ==== Parameters
      # * +text+ - Required. The text to send to the clipboard.
      def self.copy text
        IO.popen("pbcopy", 'w').print text
        text
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pennyworth-3.1.0 lib/pennyworth/kits/clipboard.rb
pennyworth-3.0.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.6.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.5.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.4.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.3.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.2.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.1.0 lib/pennyworth/kits/clipboard.rb
pennyworth-2.0.0 lib/pennyworth/kits/clipboard.rb
pennyworth-1.0.0 lib/pennyworth/kits/clipboard.rb