Skip to content

Instantly share code, notes, and snippets.

@pdtpatrick
Created December 2, 2012 21:44
Show Gist options
  • Save pdtpatrick/3e197d01f6c9c76452f1 to your computer and use it in GitHub Desktop.
Save pdtpatrick/3e197d01f6c9c76452f1 to your computer and use it in GitHub Desktop.
need_help1
#!/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