class BookClubPicks::CLI
Our CLI
Controller
Public Instance Methods
book_details()
click to toggle source
# File lib/book_club_picks/cli.rb, line 96 def book_details puts "Title: #{@individual_details.name}" puts "" puts "------------------------------" puts "" puts "#{@individual_details.published}" puts "" puts "------------------------------" puts "" puts "#{@individual_details.clubs}" puts "" puts "------------------------------" puts "" puts "#{@individual_details.summary}" puts "" puts "------------------------------" end
call()
click to toggle source
# File lib/book_club_picks/cli.rb, line 4 def call puts "" puts "Welcome to Book Club Picks. You have come to the right place to find interesting books for your club to read. Browse through titles to find out more. Discover how many other clubs are currently reading that book!" puts "" puts "------------------------------" puts "" top_ten end
goodbye()
click to toggle source
# File lib/book_club_picks/cli.rb, line 114 def goodbye puts "" puts "------------------------------" puts "" puts "See you when you are ready for your next book!" puts "" puts "------------------------------" puts "" end
puts_books()
click to toggle source
# File lib/book_club_picks/cli.rb, line 32 def puts_books current_books = BookClubPicks::Scraper.today current_books.each_with_index do |book, index| puts "#{index+1}. #{book}" end end
top_ten()
click to toggle source
# File lib/book_club_picks/cli.rb, line 13 def top_ten puts "Here are this week's top 10 books." puts "They are ranked in order of their current popularity on the Book Movement website." puts "" puts "------------------------------" puts "" puts_books puts "" puts "------------------------------" puts "" puts "Which book would you like to learn more about?" puts "Enter 1-10 to read more information about each title." puts "Enter exit when you are finished browsing." puts "" puts "------------------------------" puts "" menu end