Skip to content

Instantly share code, notes, and snippets.

@Hanmac
Created March 9, 2014 08:33
Show Gist options
  • Save Hanmac/9444556 to your computer and use it in GitHub Desktop.
Save Hanmac/9444556 to your computer and use it in GitHub Desktop.
class ReadIngredients
def perform
while input = gets.chomp
break if input == 'done'
yield input
end
end
end
ingredients = []
ReadIngredients.perform do |ingredient|
ingredients << []
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment