Copy to your clipboard, just like cmd+c
This gem is mostly a playground for me. If you're looking for a more advanced gem, have a look at clipboard.
gem install cmd_c
Use the Kernel
method cmd_c
or it's alias cmdc
to copy Strings
to your clipboard.
require "cmd_c" # => true
cmd_c "foo" # => "foo"
# Your clipboard now holds foo
cmdc foo: "bar" # => "{:foo=>"bar"}"
# Your clipboard now holds {:foo=>"bar"}
Copyright (c) 2013 David Österreicher. See LICENSE for details.