class NewsReader::CLI
Constants
- APP_NAME
Public Class Methods
about()
click to toggle source
# File lib/news_reader/cli.rb, line 38 def self.about puts "News Reader CLI app by JGB Solutions. Visit https://jgb.solutions for more." end
start()
click to toggle source
# File lib/news_reader/cli.rb, line 3 def self.start NewsReader::Article.import(NewsReader::Scraper.fetch_articles) puts "----- Welcome to the News Reader CLI app! ----" puts "--" input = nil while input != "exit" menu input = gets.strip case input when 'list' NewsReader::Article.list when 'read' NewsReader::Article.read when 'about' about end end puts "Thanks for using the #{APP_NAME} app!" end