Created
November 19, 2015 22:31
-
-
Save blake41/62ff941689c0f4b5ea7a 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
def get_a_number(line) | |
if count = line.instance_variable_get("@count") | |
line.instance_variable_set("@count", count += 1) | |
else | |
line.instance_variable_set("@count", 1) | |
count = 1 | |
end | |
line << count | |
count | |
end | |
def serve_customer(line) | |
line.shift | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment