From ca20df132c075095c30c916ac2cab2c7e77a197a Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 17 Jan 2020 09:35:44 -0800 Subject: [PATCH] [pry] add rot13 method --- .pryrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.pryrc b/.pryrc index 5b01043..cb737f8 100644 --- a/.pryrc +++ b/.pryrc @@ -22,6 +22,7 @@ end def tic; @_tic = Time.now; end def toc; Time.now - @_tic; end +def rot13(s=nil); s ||= `pbpaste`; s.tr("A-Za-z","N-ZA-Mn-za-m"); end Pry::Commands.command /^$/, "repeat last command" do _pry_.input = StringIO.new(Pry.history.to_a.last)