Created
September 30, 2013 23:00
-
-
Save manleyhimself/6771542 to your computer and use it in GitHub Desktop.
This file contains 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
katz_deli = [] | |
def take_a_number(deli_line, customer) | |
deli_line << customer | |
deli_line.index(customer) + 1 | |
end | |
def now_serving(deli_line) | |
"Currently serving #{deli_line[0]}" | |
deli_line.shift | |
end | |
def line(deli_line) | |
deli_line.map! { |client| "#{deli_line.index(client) + 1}. #{client}"} | |
"Currently serving #{deli_line.join(" ")}" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment