class DustinAndersonCLIApp::Controller
Constants
- OPTIONS
- SUMMARY_REMINDER
- WELCOME
Attributes
movie[RW]
movie_scraper[RW]
Public Instance Methods
call()
click to toggle source
# File lib/CLI_class.rb, line 14 def call puts WELCOME puts OPTIONS input = "" scrape = MovieScraper.new scrape.new_with_attributes while input.downcase != 'exit' input = gets.strip! if input.downcase == 'top 10' DustinAndersonCLIApp::Movie.top_ten puts SUMMARY_REMINDER puts OPTIONS elsif input.downcase == 'top 25' DustinAndersonCLIApp::Movie.top_twentyfive puts SUMMARY_REMINDER puts OPTIONS elsif input.downcase == 'top 50' DustinAndersonCLIApp::Movie.top_fifty puts SUMMARY_REMINDER puts OPTIONS elsif input.downcase == 'list' DustinAndersonCLIApp::Movie.list_all puts SUMMARY_REMINDER puts OPTIONS elsif input.downcase == 'options' puts OPTIONS elsif input.downcase == 'movie summary' DustinAndersonCLIApp::Movie.movie_summary # elsif input.downcase == 'random' DustinAndersonCLIApp::Movie.random_movie_summary puts "\n#{OPTIONS}" else puts OPTIONS end end end