Created
February 1, 2014 18:45
-
-
Save VikiAnn/8756686 to your computer and use it in GitHub Desktop.
grab method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def grab(piece) | |
candies.any? do |candy| | |
if candy.type == piece | |
piece | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment