class Popro::Formatter::RewriteLine
Public Class Methods
new(formatter)
click to toggle source
# File lib/popro/formatter.rb, line 25 def initialize(formatter) @formatter = formatter @longest = 0 end
Public Instance Methods
call(info, *args)
click to toggle source
# File lib/popro/formatter.rb, line 30 def call(info, *args) result = @formatter.call(info, *args) @longest = [@longest, result.size].max "\r#{result.ljust(@longest, ' ')}" end