Sha256: 9129e2b13e2bf94e3ec24bf2f1c6c8ad0434015ed60945f3540f2b4e69a9af65
Contents?: true
Size: 316 Bytes
Versions: 4
Compression:
Stored size: 316 Bytes
Contents
module Clipboard module File extend self FILE = ::File.expand_path("~/.clipboard") def copy(text) ::File.open(FILE, 'w', 0o0600) { |f| f.write(text) } rescue '' paste end def paste(_ = nil) ::File.read(FILE) rescue '' end def clear copy '' end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
clipboard-1.2.1 | lib/clipboard/file.rb |
clipboard-1.2.0 | lib/clipboard/file.rb |
clipboard-1.1.2 | lib/clipboard/file.rb |
clipboard-1.1.1 | lib/clipboard/file.rb |