Class: ImgFetcher::Helpers::Terminal

Inherits:
Object
  • Object
show all
Defined in:
lib/img_fetcher/helpers/terminal.rb

Class Method Summary collapse

Class Method Details



15
16
17
18
# 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


4
5
6
7
8
# 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


10
11
12
13
# 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