Class: Autogui::Clipboard

Inherits:
Object
  • Object
show all
Defined in:
lib/win32/autogui/application.rb

Overview

Wrapper class for text portion of the RubyGem win32/clipboard

Instance Method Summary collapse

Instance Method Details

#textString

Clipboard text getter

Returns:

  • (String)

    clipboard data



18
19
20
# File 'lib/win32/autogui/application.rb', line 18

def text
  Win32::Clipboard.data
end

#text=(str) ⇒ Object

Clipboard text setter

Parameters:

  • str (String)

    text to load onto the clipboard



26
27
28
29
# File 'lib/win32/autogui/application.rb', line 26

def text=(str)
  data = str.nil? ? "" : str.dup
  Win32::Clipboard.set_data(data)
end