Sha256: b7bcbc8799891a2ad9b7efcda3e7de0e24d4650cf2441107e0abc18d1cab7ab2
Contents?: true
Size: 347 Bytes
Versions: 9
Compression:
Stored size: 347 Bytes
Contents
# frozen_string_literal: true 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
9 entries across 9 versions & 1 rubygems