class Manga::Tools::Formatter

Formatter class

Public Class Methods

display(command, *results) click to toggle source
# File lib/manga/tools/formatter.rb, line 8
def display(command, *results)
  case command
  when :search
    display_search(results)
  when :follow
    display_follow(results)
  when :follow_list
    display_follow_list(results)
  end
end

Private Class Methods

display_follow(results) click to toggle source
# File lib/manga/tools/formatter.rb, line 29
def display_follow(results)
  puts "Followed '#{results[1]['title']}'."
  puts 'Finished.'
end
display_follow_list(results) click to toggle source
# File lib/manga/tools/formatter.rb, line 34
def display_follow_list(results)
  puts 'Listing follow list...'
  results[0].each do |item|
    puts (item['title']).to_s
  end
  puts 'Finished.'
end