class Released::Runner::TUI

FIXME: extract UI

Public Class Methods

new(io) click to toggle source
# File lib/released/runner.rb, line 6
def initialize(io)
  @io = io
end

Public Instance Methods

clear_to_end_of_line() click to toggle source
# File lib/released/runner.rb, line 37
def clear_to_end_of_line
  @io << "\e[K"
end
move_down(num) click to toggle source
# File lib/released/runner.rb, line 19
def move_down(num)
  @io <<
    if num == 1
      "\e[B"
    else
      "\e[#{num}B"
    end
end
move_to_left(col = 1) click to toggle source
# File lib/released/runner.rb, line 28
def move_to_left(col = 1)
  @io <<
    if col == 1
      "\e[G"
    else
      "\e[#{col}G"
    end
end
move_up(num) click to toggle source
# File lib/released/runner.rb, line 10
def move_up(num)
  @io <<
    if num == 1
      "\e[A"
    else
      "\e[#{num}A"
    end
end