class NewsReaderCli::CLI

Public Instance Methods

goodbye() click to toggle source
# File lib/news_reader_cli/cli.rb, line 57
def goodbye
  puts "Goodbye! We will have more news for you tomorrow."
end
help_menu() click to toggle source
# File lib/news_reader_cli/cli.rb, line 61
  def help_menu
    puts <<-HEREDOC


      1. Please type 'list' for a list of today's news headlines.
      2. To read an article, please type 'a' follow by index number.
         For Example, to read article 1, type in a1.
      3. To open an article's url from publisher's website, please type 'u' follow by index number.
         For example, to open url for article 1, type in u1.
      4. To Exit, type 'exit'.
      HEREDOC
  end
menu() click to toggle source
start() click to toggle source
# File lib/news_reader_cli/cli.rb, line 4
def start
  NewsReaderCli::ApiKeyValidate.new.key_validate
  NewsReaderCli::ApiService.newsapi
  puts "Welcome to the News Reader CLI!!!"
  menu
  goodbye
end