Class: TOTP::CLI::Clipboard

Inherits:
Object
  • Object
show all
Defined in:
lib/totp/cli/clipboard.rb

Class Method Summary collapse

Class Method Details

.set(text) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/totp/cli/clipboard.rb', line 5

def set(text)
  if OS.mac?
    osx_copy(text)
  elsif OS.linux?
    linux_copy(text)
  else
    puts "Platform clipboard not supported"
    return
  end

  puts "Copied #{text} to clipboard"
end