class CommandLineInterface
Public Instance Methods
invalid()
click to toggle source
# File lib/cli.rb, line 59 def invalid puts "\nInvalid command please enter a valid command." end
list_show()
click to toggle source
# File lib/cli.rb, line 9 def list_show puts "\nToday's new episodes are:" Show.all.uniq.each_with_index do |show, index| puts "#{index+1}. #{show.name}" end puts "" end
run()
click to toggle source
# File lib/cli.rb, line 2 def run puts "\nLoading today's new TV episodes. \n(This might take a couple of minutes)" Scrapper.list_scrapper list_show list_menu end
show_info(show)
click to toggle source
# File lib/cli.rb, line 34 def show_info(show) puts "\n#{show.name}" puts "\nSummary: #{show.summary}" puts "\nGenre: #{show.genre.join(", ")}" puts "Channel: #{show.channel}" puts "Showtime: #{show.showtime}" puts "Current Season: #{show.season}" puts "New Episode: #{show.episode}. #{show.episode_name}" puts "" end