Skip to content

Instantly share code, notes, and snippets.

@manleyhimself
Created September 30, 2013 23:00
Show Gist options
  • Save manleyhimself/6771542 to your computer and use it in GitHub Desktop.
Save manleyhimself/6771542 to your computer and use it in GitHub Desktop.
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