class PrRuby::CLI

Public Instance Methods

call() click to toggle source
# File lib/pr_ruby/cli.rb, line 3
def call
 puts "Welcome to Practicing Ruby!"
 PrRuby::Scraper.new.scrape_article_info
 menu
 goodbye
end
goodbye() click to toggle source
# File lib/pr_ruby/cli.rb, line 46
def goodbye
  puts "Thanks for taking a look!"
end
list_articles() click to toggle source
# File lib/pr_ruby/cli.rb, line 10
  def list_articles
   puts "Here is a list of Ruby Articles to browse:"
    PrRuby::Letter.all.each_with_index do |letter, i|
      puts "#{i+1}. #{letter.title}"
    end
end
menu() click to toggle source