Sha256: a1be467b360d3a9219919516e6bc77f25813766e2d1f8fc11281c32dfc7cef47
Contents?: true
Size: 470 Bytes
Versions: 13
Compression:
Stored size: 470 Bytes
Contents
class PryMoves::Diff @@saved_dump = nil def initialize(pry, binding) @pry = pry @binding = binding end def run_command cmd if !@@saved_dump @@saved_dump = eval_cmd cmd @pry.output.puts "💾 Saved for diff compare:\n".cyan + @@saved_dump else diff = Diffy.diff @@saved_dump, eval_cmd(cmd) @pry.output.puts diff @@saved_dump = nil end end private def eval_cmd cmd "#{@binding.eval(cmd)}" end end
Version data entries
13 entries across 13 versions & 1 rubygems