Skip to content

Instantly share code, notes, and snippets.

@Hanmac
Created March 9, 2014 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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