Module: Clipboard::Implementation

Extended by:
Implementation
Included in:
Cygwin, File, Gtk, Implementation, Java, Linux, LinuxWayland, Mac, Osc52, Windows, Wsl
Defined in:
lib/clipboard/implementation.rb

Instance Method Summary collapse

Instance Method Details

#clear(**kwargs) ⇒ Object

Can be used to add a native clear implementation Should return true



21
22
23
24
25
# File 'lib/clipboard/implementation.rb', line 21

def clear(**kwargs)
  copy('', **kwargs)

  true
end

#copy(_data) ⇒ Object

Takes the data to copy as argument Should return true

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/clipboard/implementation.rb', line 15

def copy(_data, **)
  raise NotImplementedError, "copying not supported by this implementation, try another"
end

#paste(_clipboard_name = nil) ⇒ Object

Implement paste Should take an optional argument

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/clipboard/implementation.rb', line 9

def paste(_clipboard_name = nil, **)
  raise NotImplementedError, "pasting not supported by this implementation, try another"
end