Sha256: 670af5e1ada0319db5492e248de102a644ca6306bf21383ad3195558d70d243b

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

module Clipboard
  module Implementation
    extend self

    # Implement paste
    # Should take an optional argument
    def paste(_clipboard_name = nil, **)
      raise NotImplementedError, "pasting not supported by this implementation, try another"
    end

    # Takes the data to copy as argument
    # Should return true
    def copy(_data, **)
      raise NotImplementedError, "copying not supported by this implementation, try another"
    end

    # Can be used to add a native clear implementation
    # Should return true
    def clear(**kwargs)
      copy('', **kwargs)

      true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clipboard-2.0.0 lib/clipboard/implementation.rb