-
-
Save pdtpatrick/3e197d01f6c9c76452f1 to your computer and use it in GitHub Desktop.
need_help1
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
#!/usr/bin/env ruby | |
#testing | |
def tester(obj) | |
list = {} | |
list['name'] = 'Patrick' | |
list['Patrick'] = 'Age' | |
list['Age'] = 'Addy' | |
list['Addy'] = '_none' | |
if obj.empty? | |
list['name'] | |
else | |
list[obj] | |
end | |
end | |
collector = [] | |
blah = "" | |
loop do | |
blah = tester(blah) | |
break if blah == "_none" | |
collector << blah | |
end | |
puts collector.inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment