class NbaLeader::CLI

Public Instance Methods

call() click to toggle source
# File lib/nba_leader/cli.rb, line 3
def call
  list_leaders
  menu
  goodbye
end
goodbye() click to toggle source
# File lib/nba_leader/cli.rb, line 37
def goodbye
  puts "Thanks for stopping by. Now go score buckets!!".yellow
end
list_leaders() click to toggle source
# File lib/nba_leader/cli.rb, line 9
def list_leaders
  puts "Here are the NBA All-Time Leading Scorers:"
  @leaders = NbaLeader::Leader.scrape_leaders
  @leaders.each.with_index(1) do |leader, i|
    puts "#{i}. #{leader.name}"
  end
end
menu() click to toggle source