Created
September 27, 2013 03:19
-
-
Save ahimmelstoss/6723723 to your computer and use it in GitHub Desktop.
Conference Lab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $conference_speakers = ["Edsger", "Ada", "Charles", "Alan", "Grace", "Linus", "Matz"] | |
| def badge_printer(speaker_array) | |
| speaker_array.each do |name| | |
| puts "Hello, my name is #{name}!" | |
| end | |
| end | |
| def room_assignments(speaker_array) | |
| speaker_array.each_index do |index| | |
| room = index + 1 | |
| name = speaker_array[index] | |
| puts "Hello, #{name}! You'll be assigned to room #{room}" | |
| end | |
| end | |
| def to_printer | |
| badge_printer($conference_speakers) | |
| room_assignments($conference_speakers) | |
| end | |
| to_printer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment