Send last irb output to Windows clipboard

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?

On Oct 19, 6:32 am, Mark C. [email protected] 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

ghorner wrote:

end
Wow. Neat.

Thanks.