Sha256: c25718c86e34d0c5dd8faecbba4fe61440ac24686fdd8608746c742f8c514a80
Contents?: true
Size: 572 Bytes
Versions: 4
Compression:
Stored size: 572 Bytes
Contents
# Clipboard is a centralized point to shell out to each individual platform's # clipboard, pasteboard, or whatever they decide to call it. # module Boom class Clipboard class << self # Public: copies a given Item's value to the clipboard. This method is # designed to handle multiple platforms. # # Returns nothing. def copy(item) if RUBY_PLATFORM =~ /darwin/ `echo '#{item.value}' | tr -d "\n" | pbcopy` end "Boom! We just copied #{item.value} to your clipboard." end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
boom-0.0.4 | lib/boom/clipboard.rb |
boom-0.0.3 | lib/boom/clipboard.rb |
boom-0.0.2 | lib/boom/clipboard.rb |
boom-0.0.1 | lib/boom/clipboard.rb |