Class: ImgFetcher::Helpers::Terminal
- Inherits:
-
Object
- Object
- ImgFetcher::Helpers::Terminal
- Defined in:
- lib/img_fetcher/helpers/terminal.rb
Class Method Summary collapse
- .print_general_status(stats) ⇒ Object
- .print_headlines(file_path, output_directory) ⇒ Object
- .print_line_status(line, index, status) ⇒ Object
Class Method Details
.print_general_status(stats) ⇒ Object
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 |
.print_headlines(file_path, output_directory) ⇒ Object
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 |
.print_line_status(line, index, status) ⇒ Object
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 |