class NewestKickstarter::CLI
Public Instance Methods
goodbye()
click to toggle source
# File lib/newest_kickstarter/cli.rb, line 68 def goodbye # Closing Method # Signal to the user that CLI has ended puts "Thanks for stopping by. See you later for more projects!" end
list()
click to toggle source
# File lib/newest_kickstarter/cli.rb, line 9 def list # Scraping Method puts "" #Skips Line puts "************* (Top 20) Newest Kickstarter Projects *************" # List Title puts "" #Skips Line #Call .all method on Project Class, take each with index and puts NewestKickstarter::Project.all.each.with_index(1) do |project, i| puts "#{i}. #{project.name}" #format: 1. blahblah (then skips line, for each project) end puts "" #Skips Line end
more_info(project)
click to toggle source
# File lib/newest_kickstarter/cli.rb, line 51 def more_info(project) puts "" #Skips Line # Run .name method on searched project puts "-------------- #{project.name} --------------" puts "" #Skips Line # Run .summary method on searched project puts project.summary puts "" #Skips Line # Run .author method on searched project puts "Author: #{project.author}" puts "" #Skips Line # Run .url method on searched project puts "URL: #{project.url}" puts "" #Skips Line # Then prompt question again end
start()
click to toggle source
# File lib/newest_kickstarter/cli.rb, line 3 def start # Dictates the flow and order of my gem list # Call Scraping Method menu # Call Interactive Method goodbye # Call Closing Method end