Skip to content

Instantly share code, notes, and snippets.



Created Aug 23, 2013
What would you like to do?
Trying to cut down the size of Jan Dvorak's answer to this question: 0
loop{$><<'> '
puts({list:->{{|x|?|+" %%%ds |"{|e|e.to_s.size}.max*2%x}},count:->{h[b]!=0?h[b]:"There is no #{b} pie!"},buy:->{h[c]+=b.to_i},sell:->{h[c]-=b.to_i},exit:->{abort"The pie store has closed!"}}[a.intern][])rescue puts"That's not a valid command."}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.