Sha256: 09c767a6204c95f11873f23befec0ed1812e385491a42cf2c2faa93609e17f8a
Contents?: true
Size: 380 Bytes
Versions: 1
Compression:
Stored size: 380 Bytes
Contents
# frozen_string_literal: true require_relative "implementation" module Clipboard module File include Implementation extend self FILE = ::File.expand_path("~/.clipboard") def copy(data, **) ::File.open(FILE, 'w', 0o0600) { |f| f.write(data) } rescue '' true end def paste(_ = nil, **) ::File.read(FILE) rescue '' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
clipboard-2.0.0 | lib/clipboard/file.rb |