class Putsplus::Footer

Sticks text to last line in console

Attributes

text[RW]
thread[R]

Public Class Methods

new(text = "") click to toggle source
# File lib/putsplus/footer.rb, line 9
def initialize(text = "")
@text = text
@thread = Thread.new {
        while true do
                sticky_footer @text
        end
}
end

Public Instance Methods

alive?() click to toggle source
# File lib/putsplus/footer.rb, line 29
def alive?
        @thread.alive?
end
kill() click to toggle source
# File lib/putsplus/footer.rb, line 18
def kill
        print " " * `tput cols`.to_i
        $stdout.flush
        Thread.kill(@thread)
end