Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 242 Bytes
require 'clipboard'
module ToClip
def to_clip(object = nil)
object = object || self
Clipboard.copy object.is_a?(String) ? object : object.inspect
object
end
alias_method :toclip, :to_clip
end
Object.send(:include, ToClip)