lib/console/event/progress.rb in console-1.9.0 vs lib/console/event/progress.rb in console-1.9.1
- old
+ new
@@ -61,10 +61,10 @@
def self.register(terminal)
terminal[:progress_bar] ||= terminal.style(:blue, :white)
end
- def as_json
+ def to_h
{current: @current, total: @total}
end
def format(output, terminal, verbose)
output.puts "#{terminal[:progress_bar]}#{self.bar}#{terminal.reset} #{sprintf('%6.2f', self.value * 100)}%"