File.expand_path("~/.clipboard")
17 18 19
# File 'lib/clipboard/file.rb', line 17 def clear copy '' end
8 9 10 11
# File 'lib/clipboard/file.rb', line 8 def copy(text) File.open(FILE, 'w', 0600) { |f| f.write(text) } rescue '' paste end
13 14 15
# File 'lib/clipboard/file.rb', line 13 def paste(_ = nil) File.read(FILE) rescue '' end