class NytimesTopStories::CLI
Public Instance Methods
call()
click to toggle source
# File lib/cli.rb, line 3 def call puts NytimesTopStories::Scraper.get_date puts "Headlines live from NYT:" self.display_stories self.menu self.goodbye end
display_stories()
click to toggle source
# File lib/cli.rb, line 11 def display_stories NytimesTopStories::Story.new_from_array NytimesTopStories::Story.all.each.with_index(1) {|story, i| puts "#{i}: #{story.headline}"} end
goodbye()
click to toggle source
# File lib/cli.rb, line 34 def goodbye puts "The truth is more important now than ever." exit(0) end