class DiffRunner::Presenter
Attributes
pid[R]
Public Instance Methods
present(str)
click to toggle source
# File lib/diff-runner/presenter.rb, line 6 def present(str) presenting = true if @pid Process.kill("QUIT", @pid) rescue nil end Thread.new do puts `clear` IO.popen("less", "w") do |io| io.puts str @pid = io.pid end if !presenting puts `clear` exit(0) end end presenting = false end