Skip to content

Instantly share code, notes, and snippets.

@Ruxton
Forked from osiro/how_to.rb
Created Nov 16, 2012
Embed
What would you like to do?
How to make caipirinha
def name_of_the_drink ingredients
case ingredients
when 'cachaça + lime + ice + sugar'
return 'Caipirinha'
when 'cachaça + juice + sugar'
return 'Batida'
when 'cachaça + cashew'
return 'Caju Amigo'
when 'cachaça + water + sugar + orange||lime + cloves + cinnamon + ginger'
return 'Quentão'
when 'cachaça + milk + cocoa liquer + condensed milk'
return 'Leite de Onça'
when 'voda + lime + ice + sugar'
return 'Caipiroska'
when 'lime + ice + sugar'
return 'Lemon Juice'
when 'ice + sugar'
return 'Sweet water'
when 'ice'
return 'Water'
when 'sugar'
return 'Diabetes'
else
return 'WTF!'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment