2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/twexicon/cli.rb', line 2
def call
puts "Welcome to Twexicon."
run = true
while run
username = Twexicon::Validator.new.run
= Twexicon::Scraper.new(username).
if .empty?
puts "Unfortunately, @#{username} has never tweeted or has their tweets protected. Sorry about that."
else
Twexicon::Analyzer.new(username, )
end
input = ""
until input =~ /^[yn]$/
puts "Would you like to look up tweets from another Twitter handle? [Y/N]"
input = gets.strip.gsub(/\W/, "").downcase
end
input =~ /[n]/ ? run = false : run = true
end
puts "Thank you –– come again!"
end
|