Class: RubyQuiz2::SelectionsPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_quiz_2/selections_printer.rb

Instance Method Summary collapse

Instance Method Details



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/ruby_quiz_2/selections_printer.rb', line 4

def print(selections)
  puts
  puts "SECRET SANTA SELECTIONS"
  puts
  w = 25
  puts "Santa".ljust(w, " ") + " " + "Giftee"
  puts "-----".ljust(w, "-") + " " + "------".ljust(w, "-")
  selections.each do |selection|
    puts selection.santa.name.ljust(w, " ") + " " + selection.giftee.name
  end
  puts
end