This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to #{problem.title} | |
| # by david | |
| # http://lh:3000/problems/blackjack | |
| def twenty_one?(*cards) | |
| 21 == cards.inject(:+) | |
| end |
This file contains hidden or 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
| # Solution to 'The Curious Case of the Missing Method Part 3' on rubeque.com | |
| # by david | |
| # http://lh:3000/problems/the-curious-case-of-the-missing-method-part-3 | |
| a1 = [1, 2, 3] | |
| a2 = [2, 3, 4] | |
| b1 = ["durham", "bartow", "zwolle"] | |
| b2 = ["nc", "fl", "nl"] | |
| assert_equal a1.zip(a2), [[1, 2], [2, 3], [3, 4]] |
This file contains hidden or 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
| # Solution to 'The Curious Case of the Missing Method Part 3' on rubeque.com | |
| # by david | |
| # http://lh:3000/problems/the-curious-case-of-the-missing-method-part-3 | |
| a1 = [1, 2, 3] | |
| a2 = [2, 3, 4] | |
| b1 = ["durham", "bartow", "zwolle"] | |
| b2 = ["nc", "fl", "nl"] | |
| assert_equal a1.zip(a2), [[1, 2], [2, 3], [3, 4]] |