Sha256: 3c040840642781007274e5ef982c8d611b54c409b38e10973bd9df8524cd58c8
Contents?: true
Size: 536 Bytes
Versions: 3
Compression:
Stored size: 536 Bytes
Contents
class WikiOnThisDay::CLI attr_reader :todays_page def initialize @todays_page = WikiOnThisDay::Scraper::Homepage.new @todays_page.summarize print "To learn more about one of these events, enter the year as displayed above. To exit, enter anything else: " input = gets.strip more_information(input) end def more_information(year) self.todays_page.snippets.each do |snippet| if snippet.year == year puts '' puts snippet.article_abstract puts '' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wiki_on_this_day-0.2.2 | lib/wiki_on_this_day/cli.rb |
wiki_on_this_day-0.2.1 | lib/wiki_on_this_day/cli.rb |
wiki_on_this_day-0.2.0 | lib/wiki_on_this_day/cli.rb |