Skip to content

Commit

Permalink
Add Irb copy command
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan van der Gaag authored and Arjan van der Gaag committed Jul 22, 2012
1 parent 0995477 commit 6f05a2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions home/.irbrc
Expand Up @@ -21,3 +21,9 @@ class Object
(methods - Object.instance_methods).sort
end
end

def copy(*args)
IO.popen('pbcopy', 'r+') do |clipboard|
clipboard.puts args.map(&:inspect)
end
end

0 comments on commit 6f05a2e

Please sign in to comment.