class DFSPlayerRankings::CLI

Public Instance Methods

call() click to toggle source
# File lib/DFS_player_rankings/cli.rb, line 3
def call
  DFSPlayerRankings::Scraper.new.make_players
  puts "Welcome to the top DFS players in the world"
  start
end
print_player(player) click to toggle source
print_players(from_number) click to toggle source
start() click to toggle source
# File lib/DFS_player_rankings/cli.rb, line 9
def start
  puts ""
  puts "Which set of players would you like to see? 1-10, 11-20, 21-30, 31-40, 41-50"
  input = gets.strip.to_i

  print_players(input)

  puts ""
  puts "What player would you like more information on?"
  input = gets.strip

  player = DFSPlayerRankings::Player.find(input.to_i)

  print_player(player)

  puts ""
  puts "Would you like to see another player? Enter Y or N"

  input = gets.strip.downcase
  if input == "y"
    start
  else
    puts ""
    puts "Thank you! Have a great day!"
    exit
  end
end