class ImgFetcher::Helpers::Terminal
Public Class Methods
print_general_status(stats)
click to toggle source
# File lib/img_fetcher/helpers/terminal.rb, line 15 def self.print_general_status(stats) puts "\nRetrieved #{stats.retrieved_images} image(s) from a total of #{stats.total_lines}." puts "Total time: #{stats.total_time}." end
print_headlines(file_path, output_directory)
click to toggle source
# File lib/img_fetcher/helpers/terminal.rb, line 4 def self.print_headlines(file_path, output_directory) puts 'Starting process...' puts "Reading from: #{file_path}" puts "Images will be downloaded to: #{output_directory}\n\n" end
print_line_status(line, index, status)
click to toggle source
# File lib/img_fetcher/helpers/terminal.rb, line 10 def self.print_line_status(line, index, status) log = status ? 'RETRIEVED' : 'NOT RETRIEVED' puts "#{index}, #{log}, #{line}" end