<commit_before>class TwitterCli
  attr_accessor :scrape, :twitter
  def call
    puts "Welcome to Flatiron Follower!"
    puts "Please enter your Twitter handle."
    twitter_handle = gets.chomp 
    
    puts <<-EOS
    Here are your options:

    1. FOLLOW
    2. TWEET
    3. VIEW
    4. UNFOLLOW
    EOS

    puts "Please enter a command."
    command = gets.chomp.to_i
    @scrape = Scraper.new
    @twitter = TwitterApi.new
    case command
      when 1
        array = scrape.username_array
        twitter.follow_all(array)
        puts "You have followed everyone."
        #for individual case  twitter.follow_classmate(name)
      when 2
        puts "Who would you like to tweet?"
        name = gets.chomp
        handle = handle_name #convert the name to handle 
        puts "What would you like to say?"
        message = gets.chomp 
        message_student = "@{#{handle} {message}"
        tweet.tweet_at_classmate(handle, message)       
      when 3
        puts "Whose tweets would you like to view?"
        name = gets.chomp
        handle = handle_name #convert the name to handle
        twitter.classmate_timeline(username)
      when 4
        array = scrape.username_array
        twitter.unfollow_all(array)
        puts "You've unfollowed everyone."
    end

  end

end

<commit_msg>cleans up cli methods<commit_after>class TwitterCli
    attr_accessor :scraper, :twitter

    def call
        puts "Welcome to Flatiron Follower!"

        puts "Please enter your Twitter handle."
        twitter_handle = gets.chomp 
        options
    end

    def options
        puts <<-EOS
        Here are your options:

        1. FOLLOW ALL CLASSMATES
        2. FOLLOW A SINGLE CLASSMATE
        3. TWEET
        4. VIEW
        5. UNFOLLOW ALL CLASSMATES
        6. UNFOLLOW A SINGLE CLASSMATE
        EOS
        select_option
    end

    def select_option
        puts "Please enter a command."
        command = gets.chomp.to_i
        @scrape = Scraper.new
        @twitter = TwitterApi.new

        case command
        when 1
            follow_your_classmates
        when 2
            follow_one_classmate
        when 3
            tweet
        when 4
            view_timeline
        when 5
            unfollow_all_classmates
        when 6
            unfollow_one_classmate
        end
    end

    def follow_your_classmates
        username_array = scrape.username_array
        twitter.follow(username_array)
        puts "You have followed everyone."

    end

    def follow_one_classmate
        puts "Please enter the name of the classmate you want to follow."
        name = gets.chomp.downcase
        #convert to twitter handle
        twitter.follow(twitter_handle)
        puts "You have followed #{twitter_handle}."
    end

    def tweet
        puts "Please enter the name of the classmate you want to tweet at."
        name = gets.chomp.downcase
        #convert to twitter handle
        puts "Please enter your tweet"
        message = gets.chomp
        tweet = "@#{twitter_handle} #{message}"
        twitter.tweet_at_classmate(tweet)
    end

    def view_timeline
        puts "Whose tweets would you like to view? Enter a classmates name."
        name = gets.chomp
        #convert name to twitter handle
        twitter.classmate_timeline(twitter_handle)
    end

    def unfollow_all_classmates
        username_array = scrape.username_array
        twitter.unfollow(username_array)
        puts "You've unfollowed everyone."
    end

    def unfollow_one_classmate
        puts "Please enter the name of the classmate you want to unfollow."
        name = gets.chomp.downcase
        #convert to twitter handle
        twitter.unfollow(twitter_handle)
    end

end


{'fraction_non_alphanumeric': 0.05461847389558233, 'fraction_numerical': 0.00535475234270415, 'mean_word_length': 1.939417781274587, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2218273', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1062, 'n_words': 346}