Ruby n00b here.
What I'd like to do is create a command that, when invoked, copies the last output of irb to the Windows clipboard. How do I do this?
Ruby n00b here.
What I'd like to do is create a command that, when invoked, copies the last output of irb to the Windows clipboard. How do I do this?
gem install win32/clipboard
def copy_last_output
Win32::Clipboard.set_data IRB.CurrentContext.last_value
end
On Oct 19, 6:32 am, Mark Carter <m...@privacy.net> wrote:
Ruby n00b here.
What I'd like to do is create a command that, when invoked, copies the
last output of irb to the Windows clipboard. How do I do this?
ghorner wrote:
On Oct 19, 6:32 am, Mark Carter <m...@privacy.net> wrote:
Ruby n00b here.
What I'd like to do is create a command that, when invoked, copies the
last output of irb to the Windows clipboard. How do I do this?gem install win32/clipboard
def copy_last_output
Win32::Clipboard.set_data IRB.CurrentContext.last_value
end
Wow. Neat.
Thanks.